Servlet mapping and JSF


Web tier: servlets, JSP, Web frameworks: Servlet mapping and JSF

  1. Servlet mapping and JSF (1 messages)

    Dear all, 

    In the PetStore application, web.xml contains the following mappings: 

    <!-- Faces Servlet --> 
    <servlet-name>Faces Servlet</servlet-name> 
    <load-on-startup> 1 </load-on-startup> 

    <!-- Faces Servlet Mapping --> 
    <servlet-name>Faces Servlet</servlet-name> 

    .... and: 


    If I navigate in my browser to http://localhost:8087/petstore/faces/catalog.jsp?catid=Cats#feline01,1, 
    what servlet mappings will be performed: both the FacesServlet (because of the /faces) and the ControllerServlet (because of /catalog) 
    or just the best match, which is ControllerServlet ? 

    Also, when I debug the ControllerServlet, I see in the debugger that getRequestURI() is /petstore/catalog and getServletPath() is /catalog. Where is /faces then ? 

    Thank you, 
    Best regards, 


  2. is it so difficult ?[ Go to top ]

    Is my question so difficult ? Please guys, any answer will do ....