## Uses of Class
javax.servlet.ServletException

- Packages that use ServletException
  Package | Description
  --- | ---
  javax.faces.webapp | Classes required for integration of JavaServer Faces into web applications, including a standard servlet, base classes for JSP custom component tags, and concrete tag implementations for core tags.
  javax.servlet | The javax.servlet package contains a number of classes and interfaces that describe and define the contracts between a servlet class and the runtime environment provided for an instance of such a class by a conforming servlet container.
  javax.servlet.http | The javax.servlet.http package contains a number of classes and interfaces that describe and define the contracts between a servlet class running under the HTTP protocol and the runtime environment provided for an instance of such a class by a conforming servlet container.
  javax.servlet.jsp | Classes and interfaces for the Core JSP 2.3 API.

- - ### Uses of ServletException in javax.faces.webapp

    Methods in javax.faces.webapp that throw ServletException
    Modifier and Type | Method and Description
    --- | ---
    `void` | FacesServlet.`init(ServletConfig servletConfig)` Acquire the factory instances we will require.
    `void` | FacesServlet.`service(ServletRequest req, ServletResponse resp)` Process an incoming request, and create the corresponding response according to the following specification.

  - ### Uses of ServletException in javax.servlet

    Subclasses of ServletException in javax.servlet
    Modifier and Type | Class and Description
    --- | ---
    `class` | `UnavailableException` Defines an exception that a servlet or filter throws to indicate that it is permanently or temporarily unavailable.

    Methods in javax.servlet that throw ServletException
    Modifier and Type | Method and Description
    --- | ---
    `<T extends Filter> T` | ServletContext.`createFilter(Class<T> clazz)` Instantiates the given Filter class.
    `<T extends EventListener> T` | ServletContext.`createListener(Class<T> clazz)` Instantiates the given EventListener class.
    `<T extends AsyncListener> T` | AsyncContext.`createListener(Class<T> clazz)` Instantiates the given `AsyncListener` class.
    `<T extends Servlet> T` | ServletContext.`createServlet(Class<T> clazz)` Instantiates the given Servlet class.
    `void` | FilterChain.`doFilter(ServletRequest request, ServletResponse response)` Causes the next filter in the chain to be invoked, or if the calling filter is the last filter in the chain, causes the resource at the end of the chain to be invoked.
    `void` | Filter.`doFilter(ServletRequest request, ServletResponse response, FilterChain chain)` The `doFilter` method of the Filter is called by the container each time a request/response pair is passed through the chain due to a client request for a resource at the end of the chain.
    `void` | RequestDispatcher.`forward(ServletRequest request, ServletResponse response)` Forwards a request from a servlet to another resource (servlet, JSP file, or HTML file) on the server.
    `Servlet` | ServletContext.`getServlet(String name)` Deprecated. As of Java Servlet API 2.1, with no direct replacement. This method was originally defined to retrieve a servlet from a `ServletContext`. In this version, this method always returns `null` and remains only to preserve binary compatibility. This method will be permanently removed in a future version of the Java Servlet API. In lieu of this method, servlets can share information using the `ServletContext` class and can perform shared business logic by invoking methods on common non-servlet classes.
    `void` | RequestDispatcher.`include(ServletRequest request, ServletResponse response)` Includes the content of a resource (servlet, JSP page, HTML file) in the response.
    `void` | GenericServlet.`init()` A convenience method which can be overridden so that there's no need to call `super.init(config)`.
    `void` | Filter.`init(FilterConfig filterConfig)` Called by the web container to indicate to a filter that it is being placed into service.
    `void` | Servlet.`init(ServletConfig config)` Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
    `void` | GenericServlet.`init(ServletConfig config)` Called by the servlet container to indicate to a servlet that the servlet is being placed into service.
    `void` | ServletContainerInitializer.`onStartup(Set<Class<?>> c, ServletContext ctx)` Notifies this `ServletContainerInitializer` of the startup of the application represented by the given `ServletContext`.
    `void` | Servlet.`service(ServletRequest req, ServletResponse res)` Called by the servlet container to allow the servlet to respond to a request.
    `abstract void` | GenericServlet.`service(ServletRequest req, ServletResponse res)` Called by the servlet container to allow the servlet to respond to a request.

  - ### Uses of ServletException in javax.servlet.http

    Methods in javax.servlet.http that throw ServletException
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | HttpServletRequestWrapper.`authenticate(HttpServletResponse response)` The default behavior of this method is to call authenticate on the wrapped request object.
    `boolean` | HttpServletRequest.`authenticate(HttpServletResponse response)` Use the container login mechanism configured for the `ServletContext` to authenticate the user making this request.
    `protected void` | HttpServlet.`doDelete(HttpServletRequest req, HttpServletResponse resp)` Called by the server (via the `service` method) to allow a servlet to handle a DELETE request.
    `protected void` | HttpServlet.`doGet(HttpServletRequest req, HttpServletResponse resp)` Called by the server (via the `service` method) to allow a servlet to handle a GET request.
    `protected void` | HttpServlet.`doHead(HttpServletRequest req, HttpServletResponse resp)` Receives an HTTP HEAD request from the protected `service` method and handles the request.
    `protected void` | HttpServlet.`doOptions(HttpServletRequest req, HttpServletResponse resp)` Called by the server (via the `service` method) to allow a servlet to handle a OPTIONS request.
    `protected void` | HttpServlet.`doPost(HttpServletRequest req, HttpServletResponse resp)` Called by the server (via the `service` method) to allow a servlet to handle a POST request.
    `protected void` | HttpServlet.`doPut(HttpServletRequest req, HttpServletResponse resp)` Called by the server (via the `service` method) to allow a servlet to handle a PUT request.
    `protected void` | HttpServlet.`doTrace(HttpServletRequest req, HttpServletResponse resp)` Called by the server (via the `service` method) to allow a servlet to handle a TRACE request.
    `Part` | HttpServletRequestWrapper.`getPart(String name)` The default behavior of this method is to call getPart on the wrapped request object.
    `Part` | HttpServletRequest.`getPart(String name)` Gets the `Part` with the given name.
    `Collection<Part>` | HttpServletRequestWrapper.`getParts()` The default behavior of this method is to call getParts on the wrapped request object.
    `Collection<Part>` | HttpServletRequest.`getParts()` Gets all the `Part` components of this request, provided that it is of type `multipart/form-data`.
    `void` | HttpServletRequestWrapper.`login(String username, String password)` The default behavior of this method is to call login on the wrapped request object.
    `void` | HttpServletRequest.`login(String username, String password)` Validate the provided username and password in the password validation realm used by the web container login mechanism configured for the `ServletContext`.
    `void` | HttpServletRequestWrapper.`logout()` The default behavior of this method is to call login on the wrapped request object.
    `void` | HttpServletRequest.`logout()` Establish `null` as the value returned when `getUserPrincipal`, `getRemoteUser`, and `getAuthType` is called on the request.
    `protected void` | HttpServlet.`service(HttpServletRequest req, HttpServletResponse resp)` Receives standard HTTP requests from the public `service` method and dispatches them to the `do` XXX methods defined in this class.
    `void` | HttpServlet.`service(ServletRequest req, ServletResponse res)` Dispatches client requests to the protected `service` method.
    `<T extends HttpUpgradeHandler> T` | HttpServletRequestWrapper.`upgrade(Class<T> handlerClass)` Create an instance of `HttpUpgradeHandler` for an given class and uses it for the http protocol upgrade processing.
    `<T extends HttpUpgradeHandler> T` | HttpServletRequest.`upgrade(Class<T> handlerClass)` Create an instance of `HttpUpgradeHandler` for an given class and uses it for the http protocol upgrade processing.

  - ### Uses of ServletException in javax.servlet.jsp

    Methods in javax.servlet.jsp that throw ServletException
    Modifier and Type | Method and Description
    --- | ---
    `void` | HttpJspPage.`_jspService(HttpServletRequest request, HttpServletResponse response)` The _jspService()method corresponds to the body of the JSP page.
    `abstract void` | PageContext.`forward(String relativeUrlPath)` This method is used to re-direct, or "forward" the current ServletRequest and ServletResponse to another active component in the application.
    `abstract void` | PageContext.`handlePageException(Exception e)` This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.
    `abstract void` | PageContext.`handlePageException(Throwable t)` This method is intended to process an unhandled 'page' level exception by forwarding the exception to the specified error page for this JSP.
    `abstract void` | PageContext.`include(String relativeUrlPath)` Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.
    `abstract void` | PageContext.`include(String relativeUrlPath, boolean flush)` Causes the resource specified to be processed as part of the current ServletRequest and ServletResponse being processed by the calling Thread.

Copyright © 1996-2013, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.