List of examples ---------------- * Educational examples - LoginServlet - authenticates users - START HERE! - DateHandler - demonstrates CompositeTypeHandler usage - TwoForms - demonstrates 'form' parameter usage - OutputVars - demonstrates element usage - Calculator - a simple calculator - Calculators - demo using basic and enhanced calculator - DbDemo - shows how to use a simple JDBC component - GuestBook - modified example from the WebMacro distribution - FileUploads - demo of file upload/download control - RMIDemo - demo of instantiator and remote component usage - SendReceive - demo of simple messaging between components - Validate - demonstrates element usage * Sample applications - Chat - demo of a simple WWW chat with multiple rooms - Shop - demo of a simple multilingual WWW shop (uses JDBC) Notes ----- - You need Ant 1.4 or higer (see http://jakarta.apache.org/ant) to setup examples with minimum effort (files in 'config', 'db' and 'wm' directories will be reinitialized using '.orig'). - By default, DbDemo, Chat and Shop examples expect the database files stored in their 'db' directory (this is set by 'db.directory' in their particular ActionConfigs). Simiraly, FileUploads example sets up directories for file uploading. - JSDK 2.0 servletrunner should be used only as a quick start and is supported only to show that ActionServlet is compatible with Servlet API 2.0. JServ (http://java.apache.org/jserv) is an example of Servlet API 2.0 compatible production environment. Known isssues: - servletrunner throws exception if the browser closes connection - in the "Shop" example: if you log in as "admin" , then "goods" page may be not displayed correctly or browser may report "no data is available"... because of a bug in JSDK 2.0. Examples pre-installation steps - for Velocity only (http://jakarta.apache.org/velocity) ------------------------------------ 1) Uncomment on line 17 in build.xml 2) Uncomment line 'UseVelocityInExamples = true' in build.properties (if this line is commented, WebMacro will be used) Examples installation instructions for use with JSDK 2.0 servletrunner (http://www.javasoft.com/products/servlet/archive.html) ------------------------------------------------------- 1) Change directory to ActionServlet root 2) Set correct values of properties in build.properties 3) Copy examples\RMIDemo\.java.policy to your ${user.home} directory (needed only to run RMIDemo) 4) Run "ant examples" 5) Run each individual example by its "run.bat" (browser should start automatically) Examples installation instructions for use with Tomcat 3.2/4.x servlet container (http://jakarta.apache.org/tomcat) --------------------------------------------- 1) Change directory to ActionServlet root 2) Set correct values of properties in build.properties 3) Copy examples\RMIDemo\.java.policy to your ${user.home} directory (needed only to run RMIDemo) 4) Run "ant examples_war" 5) Move examples\as_examples.war to Tomcat's webapps directory 6) Restart Tomcat 7) Before running "RMIDemo" start examples\RMIDemo\run_rmi_server.bat 8) View examples under /as_examples context (i.e. goto URL like http://localhost:8080/as_examples/index.html) Examples installation instructions for use with Tomcat 3.3 servlet container (http://jakarta.apache.org/tomcat) --------------------------------------------- 1) Change directory to ActionServlet root 2) Set correct values of properties in build.properties 3) Copy examples\RMIDemo\.java.policy to your ${user.home} directory (needed only to run RMIDemo) 4) Run "ant examples_war" 5) Move examples\as_examples.war to Tomcat's webapps directory 6) Restart Tomcat 7) Before running "RMIDemo" start examples\RMIDemo\run_rmi_server.bat 8) View examples under /as/examples context (i.e. goto URL like http://localhost:8080/as/examples/index.html) Examples installation instructions for use with other Servlet 2.2+ containers ----------------------------------------------- 1) Change directory to ActionServlet root 2) Set correct values of properties in build.properties 3) Copy examples\RMIDemo\.java.policy to your ${user.home} directory (needed only to run RMIDemo) 4) Run "ant examples_war" 5) Before running "RMIDemo" start examples\RMIDemo\run_rmi_server.bat 6) Deploy examples\as_examples.war (consult your servlet container documentation how to do it)