Section 13.7. Creating a Tomcat Web Application Manually

   

13.7 Creating a Tomcat Web Application Manually

All of the steps you go through above in creating the directory structure are exactly the same when you create your application context manually. You still need to do those, and they are just as described above. If you are using a different version of Tomcat, one that does not include the Administrator application, or if you just want to know what's happening under the hood, you need to replace that step in which we created the context in the Web-based Administrator application with this one:

Find the file <TOMCAT_HOME>/tomcat4/conf/server.xml . Open this file in a text editor, and find this comment:

 <!--  Tomcat Manager Context --> 

This comment comes after the host for this container has been defined, and you can add new contexts of your own here. To add the javaforcf context, add this entry:

 <Context path="/javaforcf" docBase="javaforcf"           debug="0" privileged="true"/> 

This specifies the same information essentially that we supplied in the Web-based Administrator application eariler. The path attribute says what to look for in the URL after the host and the document base to use. So any time we type http://localhost:8080/javaforcf/ , the container will match this context and start looking for documents in the specified document root.


   
Top


Java for ColdFusion Developers
Java for ColdFusion Developers
ISBN: 0130461806
EAN: 2147483647
Year: 2005
Pages: 206
Authors: Eben Hewitt

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net