Faces Servlet Configuration

When a user requests the login page (or any JSF page) via URL entered in their browser, the request is routed
to a JSF servlet call the Faces Servlet. There is only one instance of the Faces Servlet.  Specifically, it is the
javax.faces.webapp.FacesServlet. All requests for JSF pages are processed by this special servlet. The Web
container knows to route all traffic to the Faces Servlet by adding a servlet mapping to the standard web.xml
file.

web.xml


<web-app>
  <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
      </servlet>
  <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
</web-app>


In this example, any URL that has a pattern like http://localhost:8080/[App context]/faces/[any page].jsp gets
routed to the Faces servlet.
Faces Servlet Configuration
Table of Contents
Copyright (c) 2008.  Intertech, Inc. All Rights Reserved.  This information is to be used exclusively as an
online learning aid.  Any attempts to copy, reproduce, or use for training is strictly prohibited.
Courseware
Training Resources
Tutorials
Services