Chapter 8: Web Application Administration . Sessions: Indicates

Chapter 8: Web Application Administration . Sessions: Indicates the number of active sessions for the Web application. Clicking the link for the number of sessions returns the session statistics for that particular Web application. . Commands: These are the links to the start, stop, reload, and removecommands for the Web application. The manual commands for this were shown earlier, but using the Web application manager saves the effort (and possible errors) of typing a command URL for performing these tasks. The commands are pretty much self explanatory: the List Applications link shows all deployed Web applications, and each Start/Stop/Reload/Undeploy link allows you to perform the desired task. . Deploy: The WAR file for the Web application is uploaded from the client machine to the machine on which Tomcat is running, and copied into the application base directory of the given virtual host. The deployed application is automatically started (i.e., available for use by Web clients). . Stop: Send a signal to the Web application to stop. The application is then no longer available to users, although it still remains deployed. If the list command is run again, the state of the application is shown as stopped. . Start: Start up a stopped Web application. . Reload: Signal the Web application to stop and then restart. This causes the class files and properties to be reread. The deployment descriptor is, however, not re-read. . Undeploy: Signals the application to shut down (if it is still running) and then deletes the Web application directory and the application WAR file. If there is a entry for the Web application in $CATALINA_HOME/conf/server.xml ,it gets deleted too. Deploying a Web Application A new Web application can be deployed using the manager application both locally ( Deploy directory or WAR file located on server ) as well as remotely ( Upload a WAR file to deploy ). Some of the options available via the HTTP command interface (such as the tag, update, and pause parameters) are not currently usable from the Web interface. Figure 8-4 shows the manager Web interface after successfully executing the deploycommand to deploy the hello application. As you can see, Tomcat adds another row for the application in the list of deployed applications. Tomcat Manager: Managing Applications with Ant The Tomcat management commands can also be run from an Ant build script. Ant is a Java-based build tool from the Apache Software Foundation. The capability to manage the Web application right from the build script is a very powerful feature. Appendix B provides a detailed introduction to Ant for those unfamiliar with it.

For high quality website hosting services please check java web hosting website.

Comments are closed.