Chapter 8: Web Application Administration This Web application will be deployed with the /hello context path; therefore, http://localhost: 8080/hello/index.html would be the URL to access it. The commands for building the WAR file are as follows: $ cd /path/to/hello $ jar cvf hello.war . There is also a sample Ant build script for building this WAR file, which is discussed later in the chapter and included with the code download for the book at wrox.com . The /path/to/hello is the directory in which the index.htmland hello.jsp files reside. How do you get a Web application deployed to the default content, i.e., so that you can access it as http://localhost:8080/index.html? One way to do this is to undeploy the default Web application, name your WAR file ROOT.warand deploy it. This WAR file overwrites the default Web application, deployed at / webapps/ROOT. Deployment and undeployment of Web applications are covered in the next few sections. Tomcat Manager Application As mentioned earlier, the Tomcat manager application is a Web application that enables you to carry out various system administration tasks related to deploying, undeploying, and managing a Web application. The following are the three ways to interact with the managerapplication: . Using the Web interface to the Admin application: This is discussed in the section Tomcat Manager: Web Interface. . Using the Ant-based interface: This is covered in the section Tomcat Manager: Managing Applications with Ant, later in this chapter. . Using HTTP requests: This can be done either via the browser or by writing scripts to automate the process. The section Tomcat Manager: Using HTTP Requests later in this chapter covers this in more detail. The first two mechanisms are the more commonly used and more convenient ways to manage Web applications. The HTTP request mechanism is an older mechanism that is primarily used by automated scripts, although even here, the Ant-based interface is more convenient. Future versions of Tomcat might add a Web service interface, thus enabling easier integration of the Tomcat management tasks from third-party applications. Access to the manager application is restricted to authorized users. This prevents unauthorized users from undeploying (or deploying) applications, or performing any other operation that they shouldn t. The next section discusses how this access control is configured and then examines the other configuration parameters for the manager application. Finally, it describes all the manager application commands in more detail.
For reliable and cheap web hosting services please check tomcat web hosting website.