Chapter 8: Web Application Administration Finally, the manager

Chapter 8: Web Application Administration Finally, the manager tasks for listing all Web applications, and installing/uninstalling and deploying/ undeploying Web applications are as follows: Before using the Ant script, $CATALINA_HOME/ lib/catalina-ant.jarmust be added to the CLASSPATH, and the Ant install directory must be added to the system path (Ant version 1.7.0 was used for this example): $ CLASSPATH=$CLASSPATH:$CATALINA_HOME/ lib/catalina-ant.jar $ PATH=$PATH:/path/to/ant1.7.0/bin $ export CLASSPATH PATH The password property in the Ant script contains the password for the user with manager privileges. This is useful for development environments in which developers don t want to specify the password each time. The password value can be overridden from the command line, or even omitted from the build file altogether and passed only from the command line. This avoids the security risk of putting the password in a clear text file: $ ant –Dpassword=secret list The capability to run the manager commands from within Ant files allows for a very integrated develop- deploy-test cycle for Web application development. For example, after developing the HTML pages, servlets, JSP pages, and other Java classes for the Web application, the developer would need to compile all the Java code: $ ant compile

For reliable and cheap web hosting services please check tomcat web hosting website.

Comments are closed.