Chapter 6: Advanced Tomcat Features The actual use of APR requires the download and installation of a native APR DLL. Configuration of the AprLifecycleListener will cause Tomcat 6 to attempt to find this DLL. However, if the DLL does not exist, Tomcat 6 will still be functional, but without the APR optimizations. Initialization of the JSP Processor The JSP processor in Tomcat 6 is initialized by the following line in the server.xmlfile: This JSP processor engine is a new engine that supports JSP 2.0 specification and its code name is Jasper 2. The previous listener configuration has no attributes, and simply provides an early initialization opportunity for the JSP processor prior to loading of any Web applications. Early initialization tasks include setting up a security management hook, and the initialization of an optional pool for JSP (configurable via the org.apache.jasper.runtime.JspFactoryImpl.USE_POOL system property, shown in Chapter 21 ). The actual JSP processor is a servlet, org.apache.jasper.servlet.JspServlet. This servlet is configured in the Tomcat 6 global deployment descriptor web.xml under the conf directory. Configuration of this JSP processor servlet is discussed in Chapter 5 where the system global web.xmlis explored. Summary This chapter discussed Tomcat configuration topics that are beyond the basic up-and-running requirements. The following important areas were covered: . The Access Log Valve can enable logging of resource access at different levels: the Web application, the virtual host, or globally across all the virtual hosts. This Valve is highly configurable, and you can customize the name as well as the actual format of the log entries, although the commonformat is the best known. . The standard Single Sign-on Valve enhances the user experience because users no longer must type in a username and password every time they switch between Web applications running on the same host. This Valve caches the credentials on the server and passes them between the applications as required. . The Request Filter Valves are easily configured to control all incoming requests that are to be processed or blocked entirely. These valves can block a list of IP addresses or host names. . The lesser-known Request Dumper Valve can be used to debug other valves and/or components, and to visualize the effects of scoping. . The configurable Persistent Session Manager component can be used to provide a measure of reliability to Tomcat. It can periodically back up sessions on disk, and also swap out dormant sessions to make room for active sections. Most important, it will restore sessions from disk when it starts up. This enables sessions to persist between restarts of the Tomcat server.
For high quality java hosting services please check tomcat web hosting website.
This entry was posted
on Wednesday, March 25th, 2009 at 2:11 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.