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 |