Java Tutorial - Java Script :
Tomcat Manager and Administration Tools
Tomcat 4.1 provides two tools to assist you with controlling the application server. These tools are Web-based and accessible from the Tomcat startup page. The tools are the Tomcat Administration Tool and the Tomcat Manager Tool. We will discuss the Manager Tool first. Start the Manager Tool by selecting this option from the startup page. You will be prompted to enter a username and password. The username is admin and the password is the value you entered as you were installing the program (adminpasswd). After this is done, you should see a page similar to the one shown in Figure 5.8.
This page shows a table of each of the application contexts that are currently controlled by Tomcat. It also provides functions to start, stop, reload, and remove an application. There is a line allowing for the installation of a new application and a summary line that describes information about the server. The Administration tool requires a separate login, but because you have configured your admin user to support both administrator and manager roles you can use the same username and password as before. Access the Administrator tool by clicking on a context in the Manager Tool or by selecting the tool from the startup page. After you have logged in, you should see something like Figure 5.9. The page is divided into three panes. The top pane simply has buttons to submit changes or to log out. The left pane is a tree-based representation of the server configuration. The tree has three primary nodes:
· Tomcat Server node
· Resources node
· User Definitions node
The User Definitions node provides a view into the user file. The default for this file can be found in the conf subdirectory of the Tomcat installation. It is named tomcat-users.xml. The Administration tool allows these values to be viewed and edited through the browser. The Resources node allows us to view, edit, and add resources in the JNDI provider. This would be used, for example, to set up a database connection pool for use by hosted Web applications. The Tomcat Server node allows you to edit the configuration of the Tomcat server and of the Web applications it is hosting. The server configuration items correspond to the elements of the server.xml file found in the conf directory of the Tomcat installation. Each context that is being managed by Tomcat is also shown. The Administration application allows you to manage the resources used by each context and change the context configuration. Deploying a Web application in Tomcat turns out to be easy even without the management tools. If your Web application is configured as a .war file, it is simply a matter of copying the .war file into the webapps directory in the Tomcat installation and restarting Tomcat. Tomcat automatically detects and deploys the .war file under the application context matching the name of the file
