Chapter 5: Basic Tomcat Confi guration https://www.wrox.com/bookstore/BuyBook/proTomcat5 1.

Chapter 5: Basic Tomcat Confi guration https://www.wrox.com/bookstore/BuyBook/proTomcat5 1. Coyote connector with SSL support (/conf/server.xml) 2. Virtual host name (/conf/server.xml) 3. Context path (in Context Descriptor XML file) 4. Servlet mapping using URL pattern “/BuyBook/” (application’s web.xml) 5. Processed by servlet Figure 5-3: How server.xml and web.xml are involved in URL parsing In the figure, the URL https://www.wrox.com/bookstore/BuyBook/proTomcat5 is parsed through the nested components that make up a Tomcat server. First, the protocol portion ( https://) is parsed by the Service and the Coyote Connector with SSL support is selected, and the request is passed to the Engine. Next, the host name (www.wrox.com) is parsed by the Engine and one of its Host components is selected (the one that matches the www.wrox.comhost name). The Host then attempts to match the URL against the Contexts of its deployed Web applications the match in this case is /bookstore, and the bookstore Web application is selected to handle the request (the Context information itself is stored in a Context descriptor file). Last but not least, the Context hosting the Web application performs a match against the defined in the deployment descriptor (the web.xml file of the Web application), and the URL pattern /BuyBook/*matches the Book- Purchase servlet. This servlet is finally handed the URL request to process. It is easy to see how the component hierarchy helps in forwarding the request to a single servlet in a Web application for processing. SSI and CGI Mappings Now it s time to take a look at the next section of the default web.xmlfile. The next two default servlet mappings are commented out. They support SSI and CGI when Tomcat 6 is configured to work in standalone mode: ssi *.shtml –>

For high quality website hosting services please check cheap web hosting website.

Comments are closed.