Chapter 15: Shared Tomcat Hosting … Logging functionality can be added to this virtual host by defining the AccessLogValvewithin the element: AccessLogValve is covered in greater detail in Chapter 5 . The directory specified for the log files in the Valve (i.e., /home/websites/europa.dom/logs) should be created if it does not exist. Finally, the configuration is completed by (optionally) adding the contexts to serve for this virtual host, inside the element: … … This configuration has added two contexts here. The first one is the default context with an empty context path. This context has to be either defined explicitly or provided automatically by Tomcat (that is, without explicitly defining it in server.xml) if there is a Web application called ROOTin the appBaseof the virtual host. Adding contexts is optional: One convenience provided by Tomcat (version 4 and later) is that it creates automatic contexts if they exist in the appBase, even if you haven t defined them in the host definition. To provide this functionality, Tomcat looks at directories inside the appBase directory. If these directories follow the Web application structure (specifically, if they contain a WEB-INF/web.xmlfile in them), Tomcat automatically provides contexts with context paths equal to the name of the directory under appBase. Remember that the default parameters for these contexts are picked up from $CATALINA_HOME/conf/ web.xml.
For reliable and cheap web hosting services please check tomcat web hosting website.
This entry was posted
on Saturday, September 26th, 2009 at 12:13 pm and is filed under tomcat.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.