javax.faces.webapp
Class FacesServlet

java.lang.Object
  extended by javax.faces.webapp.FacesServlet
All Implemented Interfaces:
Servlet

public final class FacesServlet
extends Object
implements Servlet

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
static 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.
static String LIFECYCLE_ID_ATTR
          Context initialization parameter name for the lifecycle identifier of the Lifecycle instance to be utilized.
 
Constructor Summary
FacesServlet()
           
 
Method Summary
 void destroy()
          Release all resources acquired at startup time.
 ServletConfig getServletConfig()
          Return the ServletConfig instance for this servlet.
 String getServletInfo()
          Return information about this Servlet.
 void init(ServletConfig servletConfig)
          Acquire the factory instances we will require.
 void service(ServletRequest request, ServletResponse response)
          Process an incoming request, and create the corresponding response, by executing the request processing lifecycle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_FILES_ATTR

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.

See Also:
Constant Field Values

LIFECYCLE_ID_ATTR

public static final String LIFECYCLE_ID_ATTR

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

See Also:
Constant Field Values
Constructor Detail

FacesServlet

public FacesServlet()
Method Detail

destroy

public void destroy()

Release all resources acquired at startup time.

Specified by:
destroy in interface Servlet

getServletConfig

public ServletConfig getServletConfig()

Return the ServletConfig instance for this servlet.

Specified by:
getServletConfig in interface Servlet
Returns:
the ServletConfig object that initializes this servlet
See Also:
Servlet.init(javax.servlet.ServletConfig)

getServletInfo

public String getServletInfo()

Return information about this Servlet.

Specified by:
getServletInfo in interface Servlet
Returns:
a String containing servlet information

init

public void init(ServletConfig servletConfig)
          throws ServletException

Acquire the factory instances we will require.

Specified by:
init in interface Servlet
Parameters:
servletConfig - a ServletConfig object containing the servlet's configuration and initialization parameters
Throws:
ServletException - if, for any reason, the startup of this Faces application failed. This includes errors in the config file that is parsed before or during the processing of this init() method.
See Also:
UnavailableException, Servlet.getServletConfig()

service

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

Process an incoming request, and create the corresponding response, by executing the request processing lifecycle.

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.

Specified by:
service in interface Servlet
Parameters:
request - The servlet request we are processing
response - The servlet response we are creating
Throws:
IOException - if an input/output error occurs during processing
ServletException - if a servlet error occurs during processing


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.