paulb@212 | 1 | Use the build.py script in the tools/JavaServlet directory to create a Web
|
paulb@178 | 2 | application directory. Then, deploy the directory in the servlet container. For
|
paulb@178 | 3 | example:
|
paulb@178 | 4 |
|
paulb@212 | 5 | jython tools/JavaServlet/build.py examples/JavaServlet/SimpleApp.py \
|
paulb@212 | 6 | examples/Common/Simple/ \
|
paulb@212 | 7 | . \
|
paulb@212 | 8 | $CATALINA_HOME/common/lib/activation.jar \
|
paulb@212 | 9 | $CATALINA_HOME/common/lib/mail.jar
|
paulb@178 | 10 |
|
paulb@204 | 11 | This identifies the handler (SimpleApp.py), the application package (Simple)
|
paulb@204 | 12 | and the directory where the WebStack package is found; it also specifies
|
paulb@204 | 13 | library files which must also be deployed with the application (activation.jar
|
paulb@204 | 14 | and mail.jar from the Tomcat libraries in this case); it produces a directory
|
paulb@204 | 15 | called SimpleApp in the current directory. To deploy the Web application into
|
paulb@204 | 16 | a servlet container like Tomcat, a command like the following can be
|
paulb@204 | 17 | performed:
|
paulb@178 | 18 |
|
paulb@204 | 19 | mv SimpleApp/ $CATALINA_HOME/webapps/
|
paulb@178 | 20 |
|
paulb@178 | 21 | Upon starting or restarting the servlet container, an URL such as the following
|
paulb@178 | 22 | can be used to visit the application:
|
paulb@178 | 23 |
|
paulb@212 | 24 | http://localhost:8080/SimpleApp/
|