Home » Mojarra-2.0.1 » javax » faces » webapp » [javadoc | source]
public final class: FacesServlet [javadoc | source]

All Implemented Interfaces:

FacesServlet is a servlet that manages the request processing lifecycle for web applications that are utilizing JavaServer Faces to construct the user interface.

Field Summary
public static final  String CONFIG_FILES_ATTR   

Context initialization parameter name for a comma delimited list of context-relative resource paths (in addition to /WEB-INF/faces-config.xml which is loaded automatically if it exists) containing JavaServer Faces configuration information.

public static final  String LIFECYCLE_ID_ATTR   

Context initialization parameter name for the lifecycle identifier of the Lifecycle instance to be utilized.

Method from javax.faces.webapp.FacesServlet Summary:
destroy,   getServletConfig,   getServletInfo,   init,   service
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.faces.webapp.FacesServlet Detail:
 public  void destroy() 

    Release all resources acquired at startup time.

 public ServletConfig getServletConfig() 

    Return the ServletConfig instance for this servlet.

 public String getServletInfo() 

    Return information about this Servlet.

 public  void init(ServletConfig servletConfig) throws ServletException 

    Acquire the factory instances we will require.

 public  void service(ServletRequest request,
    ServletResponse response) throws IOException, ServletException 

    Process an incoming request, and create the corresponding response according to the following specification.

    If the request and response arguments to this method are not instances of HttpServletRequest and HttpServletResponse, respectively, the results of invoking this method are undefined.

    This method must respond to requests that start with the following strings by invoking the sendError method on the response argument (cast to HttpServletResponse), passing the code HttpServletResponse.SC_NOT_FOUND as the argument.


    If none of the cases described above in the specification for this method apply to the servicing of this request, the following action must be taken to service the request.

    Acquire a FacesContext instance for this request.

    Acquire the ResourceHandler for this request by calling javax.faces.application.Application#getResourceHandler . Call javax.faces.application.ResourceHandler#isResourceRequest . If this returns true call javax.faces.application.ResourceHandler#handleResourceRequest . If this returns false, call javax.faces.lifecycle.Lifecycle#execute followed by javax.faces.lifecycle.Lifecycle#render . If a javax.faces.FacesException is thrown in either case, extract the cause from the FacesException. If the cause is null extract the message from the FacesException, put it inside of a new ServletException instance, and pass the FacesException instance as the root cause, then rethrow the ServletException instance. If the cause is an instance of ServletException, rethrow the cause. If the cause is an instance of IOException, rethrow the cause. Otherwise, create a new ServletException instance, passing the message from the cause, as the first argument, and the cause itself as the second argument.

    In a finally block, javax.faces.context.FacesContext#release must be called.