Questions and Answers - Packaging and Deployment

   
 

 

Guidelines, Patterns, and code for end-to-end Java applications.



Questions and Answers - Packaging and Deployment
  1.  
  2. How do I map multiple URLs to point to a single page created with the JavaServer Pages TM technology (JSP TM page)?

    1.   How do I map multiple URLs to point to a single page created with the JavaServer Pages TM technology (JSP TM page)?

    The web deployment descriptor maps URLs to web components. For example, the Java Pet Store sample application maps all URLs matching /control/* to MainServlet in web.xml like this:

     

                              <web-app>   <display-name>WebTier</display-name>   <description>no description</description>    <servlet>     <servlet-name>webTierEntryPoint</servlet-name>     <display-name>centralServlet</display-name>     <description>no description</description>     <servlet-class>   com.sun.j2ee.blueprints.petstore.control.web.MainServlet     </servlet-class>   </servlet>    <servlet-mapping>     <servlet-name>webTierEntryPoint</servlet-name>     <url-pattern>/control/*</url-pattern>   </servlet-mapping>    <!-- web.xml continues... -->
                          



Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner Java 8 banner (182)