## Uses of Interface
javax.servlet.Servlet

- Packages that use Servlet
  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 Servlet in javax.faces.webapp

    Classes in javax.faces.webapp that implement Servlet
    Modifier and Type | Class and Description
    --- | ---
    `class` | `FacesServlet` FacesServlet is a servlet that manages the request processing lifecycle for web applications that are utilizing JavaServer Faces to construct the user interface.

  - ### Uses of Servlet in javax.servlet

    Classes in javax.servlet that implement Servlet
    Modifier and Type | Class and Description
    --- | ---
    `class` | `GenericServlet` Defines a generic, protocol-independent servlet.

    Methods in javax.servlet with type parameters of type Servlet
    Modifier and Type | Method and Description
    --- | ---
    `<T extends Servlet> T` | ServletContext.`createServlet(Class<T> clazz)` Instantiates the given Servlet class.

    Methods in javax.servlet that return Servlet
    Modifier and Type | Method and Description
    --- | ---
    `Servlet` | UnavailableException.`getServlet()` Deprecated. As of Java Servlet API 2.2, with no replacement. Returns the servlet that is reporting its unavailability.
    `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.

    Methods in javax.servlet that return types with arguments of type Servlet
    Modifier and Type | Method and Description
    --- | ---
    `Enumeration<Servlet>` | ServletContext.`getServlets()` Deprecated. As of Java Servlet API 2.0, with no replacement. This method was originally defined to return an `Enumeration` of all the servlets known to this servlet context. In this version, this method always returns an empty enumeration and remains only to preserve binary compatibility. This method will be permanently removed in a future version of the Java Servlet API.

    Methods in javax.servlet with parameters of type Servlet
    Modifier and Type | Method and Description
    --- | ---
    `ServletRegistration.Dynamic` | ServletContext.`addServlet(String servletName, Servlet servlet)` Registers the given servlet instance with this ServletContext under the given `servletName`.

    Method parameters in javax.servlet with type arguments of type Servlet
    Modifier and Type | Method and Description
    --- | ---
    `ServletRegistration.Dynamic` | ServletContext.`addServlet(String servletName, Class<? extends Servlet> servletClass)` Adds the servlet with the given name and class type to this servlet context.

    Constructors in javax.servlet with parameters of type Servlet
    Constructor and Description
    `UnavailableException(int seconds, Servlet servlet, String msg)` Deprecated. As of Java Servlet API 2.2, use `UnavailableException.UnavailableException(String, int)` instead.
    `UnavailableException(Servlet servlet, String msg)` Deprecated. As of Java Servlet API 2.2, use `UnavailableException.UnavailableException(String)` instead.

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

    Classes in javax.servlet.http that implement Servlet
    Modifier and Type | Class and Description
    --- | ---
    `class` | `HttpServlet` Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site.

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

    Subinterfaces of Servlet in javax.servlet.jsp
    Modifier and Type | Interface and Description
    --- | ---
    `interface` | `HttpJspPage` The HttpJspPage interface describes the interaction that a JSP Page Implementation Class must satisfy when using the HTTP protocol.
    `interface` | `JspPage` The JspPage interface describes the generic interaction that a JSP Page Implementation class must satisfy; pages that use the HTTP protocol are described by the HttpJspPage interface.

    Methods in javax.servlet.jsp with parameters of type Servlet
    Modifier and Type | Method and Description
    --- | ---
    `abstract PageContext` | JspFactory.`getPageContext(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int buffer, boolean autoflush)` obtains an instance of an implementation dependent javax.servlet.jsp.PageContext abstract class for the calling Servlet and currently pending request and response.
    `abstract void` | PageContext.`initialize(Servlet servlet, ServletRequest request, ServletResponse response, String errorPageURL, boolean needsSession, int bufferSize, boolean autoFlush)` The initialize method is called to initialize an uninitialized PageContext so that it may be used by a JSP Implementation class to service an incoming request and response within it's _jspService() method.

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