Chapter 8: Web Application Administration Following is a summary of some of the tasks that the manager application can perform: . Deploy a new Web application . List the currently deployed Web applications, as well as the sessions that are currently active for those Web applications . Reload an existing Web application . List the available global JNDI resources . List the available security roles . Start a stopped application . Stop an existing application, but not undeploy it . Undeploy a Web application . Display session statistics An application can be deployed manually, too. Following are the ways to do this: . Add a entry in Tomcat s server.xmlconfiguration file. This enables you to place the Web application in a location other than the default $CATALINA_HOME/webappsdirectory. . Copy the entire application directory into the $CATALINA_HOME/webapps directory. The server.xmlfile does not have to be edited in this case. . Copy the WAR file for the application into the $CATALINA_HOME/webapps directory. In this option, too, the server.xmlfile does not have to be edited. However, there are advantages to using a managerapplication. First, all these methods of deploying just described require you to restart Tomcat. When deploying is done via the manager application, Tomcat is not restarted and, hence, the other running Web applications are not affected. Alternatively, the autoDeployattribute in the Host(see server.xml) could be set to true, which is actually the default in Tomcat 6. This causes any Web application dropped into Tomcat s application base to be deployed automatically. Doing this compromises performance, however, because Tomcat must continually monitor the application base directory; hence, autoDeployis often set to false. If autoDeploy is set to false, then copying the Web application or the WAR file to the webapps directory will not deploy the Web application. You would need to either restart Tomcat or use the deploycommand. Another advantage of using the manager application is that it supports remote installs. That is, the Web application directory (or WAR file) doesn t need to be transferred via FTP or some other means to the host machine running Tomcat. The deploy command takes care of transferring the Web application WAR file from the local development machine to the remote machine running the Tomcat server. Enabling Access to the Manager Application Before using the manager application, the server needs to be configured to enable access. Access to this application is controlled via a Security Realm. Any Realm implementation can be used (Memory, User Database, JDBC, JNDI, or JAAS). This example uses the default Realm, the User Database Realm, for simplicity.
For high quality website hosting services please check cheap web hosting website.