3.2.2 Configuring Tomcat to Recognize the New Application
To make the Tomcat servlet engine aware of the new application, you have to add a new
entry to Tomcat's server.xml configuration file with information on the location of your
application. Furthermore, the application itself has to be deployed with a configuration file called
web.xml describing the servlets it contains, as well as other critical application data. The
necessary steps for a successful set up of the two files are outlined below.
Part 1: Configuring the Tomcat servlet engine's configuration file called server.xml.
Open the server.xml file in a text editor, e.g. emacs.
$ emacs $TOMCAT_HOME/conf/server.xml
The server.xml file already contains some context elements. Navigate to the end of the file,
and add the new context element, as shown below:
docBase="/devteam/deployHome"
debug="0"
reloadable="true"
trusted="false" >
The path attribute indicates the virtual directory under which the browser may access the
physical document root directory docBase on the server (this should be the directory
containing the web application during development, it should be the same directory as the
deployment home directory specified in the build.xml file).
Please refer to the Apache Software Foundation's Tomcat application development guide for
a detailed explanation of the other attributes.
36
Java Web Hosting Application Development Using Java Technologies Hosting
|
|
|
|
TotalRoute.net Business web hosting division of Vision Web Hosting Inc. All rights reserved. |