## Uses of Interface
javax.servlet.ServletContext

- Packages that use ServletContext
  Package | Description
  --- | ---
  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.
  javax.servlet.jsp.jstl.core | Classes and interfaces related to the core tag library component of the JavaServer Pages Standard Tag Library (JSTL).
  javax.xml.rpc.server | This package defines APIs for the servlet based JAX-RPC endpoint model.

- - ### Uses of ServletContext in javax.servlet

    Methods in javax.servlet that return ServletContext
    Modifier and Type | Method and Description
    --- | ---
    `ServletContext` | ServletContext.`getContext(String uripath)` Returns a `ServletContext` object that corresponds to a specified URL on the server.
    `ServletContext` | ServletRequestWrapper.`getServletContext()` Gets the servlet context to which the wrapped servlet request was last dispatched.
    `ServletContext` | ServletRequestEvent.`getServletContext()` Returns the ServletContext of this web application.
    `ServletContext` | ServletRequest.`getServletContext()` Gets the servlet context to which this ServletRequest was last dispatched.
    `ServletContext` | ServletContextEvent.`getServletContext()` Return the ServletContext that changed.
    `ServletContext` | ServletConfig.`getServletContext()` Returns a reference to the `ServletContext` in which the caller is executing.
    `ServletContext` | GenericServlet.`getServletContext()` Returns a reference to the `ServletContext` in which this servlet is running.
    `ServletContext` | FilterConfig.`getServletContext()` Returns a reference to the `ServletContext` in which the caller is executing.

    Methods in javax.servlet with parameters of type ServletContext
    Modifier and Type | Method and Description
    --- | ---
    `void` | AsyncContext.`dispatch(ServletContext context, String path)` Dispatches the request and response objects of this AsyncContext to the given `path` scoped to the given `context`.
    `void` | ServletContainerInitializer.`onStartup(Set<Class<?>> c, ServletContext ctx)` Notifies this `ServletContainerInitializer` of the startup of the application represented by the given `ServletContext`.

    Constructors in javax.servlet with parameters of type ServletContext
    Constructor and Description
    `ServletContextAttributeEvent(ServletContext source, String name, Object value)` Constructs a ServletContextAttributeEvent from the given ServletContext, attribute name, and attribute value.
    `ServletContextEvent(ServletContext source)` Construct a ServletContextEvent from the given context.
    `ServletRequestAttributeEvent(ServletContext sc, ServletRequest request, String name, Object value)` Construct a ServletRequestAttributeEvent giving the servlet context of this web application, the ServletRequest whose attributes are changing and the name and value of the attribute.
    `ServletRequestEvent(ServletContext sc, ServletRequest request)` Construct a ServletRequestEvent for the given ServletContext and ServletRequest.

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

    Methods in javax.servlet.http that return ServletContext
    Modifier and Type | Method and Description
    --- | ---
    `ServletContext` | HttpSession.`getServletContext()` Returns the ServletContext to which this session belongs.

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

    Methods in javax.servlet.jsp that return ServletContext
    Modifier and Type | Method and Description
    --- | ---
    `abstract ServletContext` | PageContext.`getServletContext()` The ServletContext instance.

    Methods in javax.servlet.jsp with parameters of type ServletContext
    Modifier and Type | Method and Description
    --- | ---
    `abstract JspApplicationContext` | JspFactory.`getJspApplicationContext(ServletContext context)` Obtains the `JspApplicationContext` instance associated with the web application for the given `ServletContext`.

  - ### Uses of ServletContext in javax.servlet.jsp.jstl.core

    Methods in javax.servlet.jsp.jstl.core with parameters of type ServletContext
    Modifier and Type | Method and Description
    --- | ---
    `static Object` | Config.`get(ServletContext context, String name)` Looks up a configuration variable in the "application" scope.
    `static void` | Config.`remove(ServletContext context, String name)` Removes a configuration variable from the "application" scope.
    `static void` | Config.`set(ServletContext context, String name, Object value)` Sets the value of a configuration variable in the "application" scope.

  - ### Uses of ServletContext in javax.xml.rpc.server

    Methods in javax.xml.rpc.server that return ServletContext
    Modifier and Type | Method and Description
    --- | ---
    `ServletContext` | ServletEndpointContext.`getServletContext()` The method `getServletContext` returns the `ServletContex`t associated with the web application that contain this endpoint.

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