org.eclipse.jetty.servlet

## Class ServletContextHandler.Context

- java.lang.Object
- - org.eclipse.jetty.server.handler.ContextHandler.Context
  - - org.eclipse.jetty.servlet.ServletContextHandler.Context

All Implemented Interfaces:
  javax.servlet.ServletContext

Direct Known Subclasses:
  WebAppContext.Context

Enclosing class:
  ServletContextHandler

    public class ServletContextHandler.Context
    extends ContextHandler.Context

### Field Summary

### Fields inherited from class org.eclipse.jetty.server.handler.ContextHandler.Context

`_enabled, _majorVersion, _minorVersion`

### Fields inherited from interface javax.servlet.ServletContext

`ORDERED_LIBS, TEMPDIR`

### Constructor Summary

Constructors
Constructor and Description
`ServletContextHandler.Context()`

### Method Summary

Methods
`javax.servlet.FilterRegistration.Dynamic` `addFilter(String filterName, Class<? extends javax.servlet.Filter> filterClass)`
`javax.servlet.FilterRegistration.Dynamic` `addFilter(String filterName, javax.servlet.Filter filter)`
`javax.servlet.FilterRegistration.Dynamic` `addFilter(String filterName, String className)`
`void` `addListener(Class<? extends EventListener> listenerClass)`
`void` `addListener(String className)`
`<T extends EventListener> void` `addListener(T t)`
`javax.servlet.ServletRegistration.Dynamic` `addServlet(String servletName, Class<? extends javax.servlet.Servlet> servletClass)`
`javax.servlet.ServletRegistration.Dynamic` `addServlet(String servletName, javax.servlet.Servlet servlet)`
`javax.servlet.ServletRegistration.Dynamic` `addServlet(String servletName, String className)`
`<T extends javax.servlet.Filter> T` `createFilter(Class<T> c)`
`<T extends EventListener> T` `createListener(Class<T> clazz)`
`<T extends javax.servlet.Servlet> T` `createServlet(Class<T> c)`
`void` `declareRoles(String... roleNames)`
`Set<javax.servlet.SessionTrackingMode>` `getDefaultSessionTrackingModes()`
`Set<javax.servlet.SessionTrackingMode>` `getEffectiveSessionTrackingModes()`
`javax.servlet.FilterRegistration` `getFilterRegistration(String filterName)`
`Map<String,? extends javax.servlet.FilterRegistration>` `getFilterRegistrations()`
`javax.servlet.descriptor.JspConfigDescriptor` `getJspConfigDescriptor()`
`javax.servlet.RequestDispatcher` `getNamedDispatcher(String name)`
`javax.servlet.ServletRegistration` `getServletRegistration(String servletName)`
`Map<String,? extends javax.servlet.ServletRegistration>` `getServletRegistrations()`
`javax.servlet.SessionCookieConfig` `getSessionCookieConfig()`
`boolean` `setInitParameter(String name, String value)`
`void` `setJspConfigDescriptor(javax.servlet.descriptor.JspConfigDescriptor d)`
`void` `setSessionTrackingModes(Set<javax.servlet.SessionTrackingMode> sessionTrackingModes)`

### Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler.Context

`getAttribute, getAttributeNames, getClassLoader, getContext, getContextHandler, getContextPath, getEffectiveMajorVersion, getEffectiveMinorVersion, getInitParameter, getInitParameterNames, getMajorVersion, getMimeType, getMinorVersion, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServerInfo, getServlet, getServletContextName, getServletNames, getServlets, isEnabled, log, log, log, removeAttribute, setAttribute, setEffectiveMajorVersion, setEffectiveMinorVersion, setEnabled, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### ServletContextHandler.Context

    public ServletContextHandler.Context()

### Method Detail

#### getNamedDispatcher

    public javax.servlet.RequestDispatcher getNamedDispatcher(String name)

Specified by:
  `getNamedDispatcher` in interface `javax.servlet.ServletContext`
Overrides:
  `getNamedDispatcher` in class `ContextHandler.Context`

#### addFilter

    public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
                                                     Class<? extends javax.servlet.Filter> filterClass)

Specified by:
  `addFilter` in interface `javax.servlet.ServletContext`
Overrides:
  `addFilter` in class `ContextHandler.Context`
Since:
  servlet-api-3.0

#### addFilter

    public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
                                                     String className)

Specified by:
  `addFilter` in interface `javax.servlet.ServletContext`
Overrides:
  `addFilter` in class `ContextHandler.Context`
Since:
  servlet-api-3.0

#### addFilter

    public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName,
                                                     javax.servlet.Filter filter)

Specified by:
  `addFilter` in interface `javax.servlet.ServletContext`
Overrides:
  `addFilter` in class `ContextHandler.Context`
Since:
  servlet-api-3.0

#### addServlet

    public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName,
                                                       Class<? extends javax.servlet.Servlet> servletClass)

Specified by:
  `addServlet` in interface `javax.servlet.ServletContext`
Overrides:
  `addServlet` in class `ContextHandler.Context`
Since:
  servlet-api-3.0

#### addServlet

    public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName,
                                                       String className)

Specified by:
  `addServlet` in interface `javax.servlet.ServletContext`
Overrides:
  `addServlet` in class `ContextHandler.Context`
Since:
  servlet-api-3.0

#### addServlet

    public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName,
                                                       javax.servlet.Servlet servlet)

Specified by:
  `addServlet` in interface `javax.servlet.ServletContext`
Overrides:
  `addServlet` in class `ContextHandler.Context`
Since:
  servlet-api-3.0

#### setInitParameter

    public boolean setInitParameter(String name,
                           String value)

Specified by:
  `setInitParameter` in interface `javax.servlet.ServletContext`
Overrides:
  `setInitParameter` in class `ContextHandler.Context`

#### createFilter

    public <T extends javax.servlet.Filter> T createFilter(Class<T> c)
                                                throws javax.servlet.ServletException

Specified by:
  `createFilter` in interface `javax.servlet.ServletContext`
Overrides:
  `createFilter` in class `ContextHandler.Context`
Throws:
  `javax.servlet.ServletException`

#### createServlet

    public <T extends javax.servlet.Servlet> T createServlet(Class<T> c)
                                                  throws javax.servlet.ServletException

Specified by:
  `createServlet` in interface `javax.servlet.ServletContext`
Overrides:
  `createServlet` in class `ContextHandler.Context`
Throws:
  `javax.servlet.ServletException`

#### getDefaultSessionTrackingModes

    public Set<javax.servlet.SessionTrackingMode> getDefaultSessionTrackingModes()

Specified by:
  `getDefaultSessionTrackingModes` in interface `javax.servlet.ServletContext`
Overrides:
  `getDefaultSessionTrackingModes` in class `ContextHandler.Context`

#### getEffectiveSessionTrackingModes

    public Set<javax.servlet.SessionTrackingMode> getEffectiveSessionTrackingModes()

Specified by:
  `getEffectiveSessionTrackingModes` in interface `javax.servlet.ServletContext`
Overrides:
  `getEffectiveSessionTrackingModes` in class `ContextHandler.Context`

#### getFilterRegistration

    public javax.servlet.FilterRegistration getFilterRegistration(String filterName)

Specified by:
  `getFilterRegistration` in interface `javax.servlet.ServletContext`
Overrides:
  `getFilterRegistration` in class `ContextHandler.Context`

#### getFilterRegistrations

    public Map<String,? extends javax.servlet.FilterRegistration> getFilterRegistrations()

Specified by:
  `getFilterRegistrations` in interface `javax.servlet.ServletContext`
Overrides:
  `getFilterRegistrations` in class `ContextHandler.Context`

#### getServletRegistration

    public javax.servlet.ServletRegistration getServletRegistration(String servletName)

Specified by:
  `getServletRegistration` in interface `javax.servlet.ServletContext`
Overrides:
  `getServletRegistration` in class `ContextHandler.Context`

#### getServletRegistrations

    public Map<String,? extends javax.servlet.ServletRegistration> getServletRegistrations()

Specified by:
  `getServletRegistrations` in interface `javax.servlet.ServletContext`
Overrides:
  `getServletRegistrations` in class `ContextHandler.Context`

#### getSessionCookieConfig

    public javax.servlet.SessionCookieConfig getSessionCookieConfig()

Specified by:
  `getSessionCookieConfig` in interface `javax.servlet.ServletContext`
Overrides:
  `getSessionCookieConfig` in class `ContextHandler.Context`

#### setSessionTrackingModes

    public void setSessionTrackingModes(Set<javax.servlet.SessionTrackingMode> sessionTrackingModes)

Specified by:
  `setSessionTrackingModes` in interface `javax.servlet.ServletContext`
Overrides:
  `setSessionTrackingModes` in class `ContextHandler.Context`

#### addListener

    public void addListener(String className)

Specified by:
  `addListener` in interface `javax.servlet.ServletContext`
Overrides:
  `addListener` in class `ContextHandler.Context`

#### addListener

    public <T extends EventListener> void addListener(T t)

Specified by:
  `addListener` in interface `javax.servlet.ServletContext`
Overrides:
  `addListener` in class `ContextHandler.Context`

#### addListener

    public void addListener(Class<? extends EventListener> listenerClass)

Specified by:
  `addListener` in interface `javax.servlet.ServletContext`
Overrides:
  `addListener` in class `ContextHandler.Context`

#### createListener

    public <T extends EventListener> T createListener(Class<T> clazz)
                                           throws javax.servlet.ServletException

Specified by:
  `createListener` in interface `javax.servlet.ServletContext`
Overrides:
  `createListener` in class `ContextHandler.Context`
Throws:
  `javax.servlet.ServletException`

#### getJspConfigDescriptor

    public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()

Specified by:
  `getJspConfigDescriptor` in interface `javax.servlet.ServletContext`
Overrides:
  `getJspConfigDescriptor` in class `ContextHandler.Context`

#### setJspConfigDescriptor

    public void setJspConfigDescriptor(javax.servlet.descriptor.JspConfigDescriptor d)

Overrides:
  `setJspConfigDescriptor` in class `ContextHandler.Context`

#### declareRoles

    public void declareRoles(String... roleNames)

Specified by:
  `declareRoles` in interface `javax.servlet.ServletContext`
Overrides:
  `declareRoles` in class `ContextHandler.Context`