Package org.eclipse.jetty.server.handler
Class ContextHandler.StaticContext
java.lang.Object
org.eclipse.jetty.util.AttributesMap
org.eclipse.jetty.server.handler.ContextHandler.StaticContext
- All Implemented Interfaces:
javax.servlet.ServletContext
,Attributes
,Dumpable
- Direct Known Subclasses:
ContextHandler.Context
- Enclosing class:
- ContextHandler
public static class ContextHandler.StaticContext
extends AttributesMap
implements javax.servlet.ServletContext
A simple implementation of ServletContext that is used when there is no
ContextHandler. This is also used as the base for all other ServletContext
implementations.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Attributes
Attributes.Wrapper
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Dumpable
Dumpable.DumpableContainer
-
Field Summary
Fields inherited from interface javax.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjavax.servlet.FilterRegistration.Dynamic
javax.servlet.FilterRegistration.Dynamic
javax.servlet.FilterRegistration.Dynamic
javax.servlet.ServletRegistration.Dynamic
addJspFile
(String servletName, String jspFile) void
addListener
(Class<? extends EventListener> listenerClass) void
addListener
(String className) <T extends EventListener>
voidaddListener
(T t) javax.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, Class<? extends javax.servlet.Servlet> servletClass) javax.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, String className) javax.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, javax.servlet.Servlet servlet) <T extends javax.servlet.Filter>
TcreateFilter
(Class<T> clazz) <T> T
createInstance
(Class<T> clazz) <T extends EventListener>
TcreateListener
(Class<T> clazz) <T extends javax.servlet.Servlet>
TcreateServlet
(Class<T> clazz) void
declareRoles
(String... roleNames) javax.servlet.ServletContext
getContext
(String uripath) Set<javax.servlet.SessionTrackingMode>
int
int
Set<javax.servlet.SessionTrackingMode>
javax.servlet.FilterRegistration
getFilterRegistration
(String filterName) getInitParameter
(String name) javax.servlet.descriptor.JspConfigDescriptor
int
getMimeType
(String file) int
javax.servlet.RequestDispatcher
getNamedDispatcher
(String name) getRealPath
(String path) javax.servlet.RequestDispatcher
getRequestDispatcher
(String uriInContext) getResource
(String path) getResourceAsStream
(String path) getResourcePaths
(String path) javax.servlet.Servlet
getServlet
(String name) Deprecated.Deprecated.javax.servlet.ServletRegistration
getServletRegistration
(String servletName) Enumeration<javax.servlet.Servlet>
Deprecated.javax.servlet.SessionCookieConfig
int
void
Deprecated.void
void
void
setEffectiveMajorVersion
(int v) void
setEffectiveMinorVersion
(int v) boolean
setInitParameter
(String name, String value) void
setRequestCharacterEncoding
(String encoding) void
setResponseCharacterEncoding
(String encoding) void
setSessionTimeout
(int sessionTimeout) void
setSessionTrackingModes
(Set<javax.servlet.SessionTrackingMode> sessionTrackingModes) Methods inherited from class org.eclipse.jetty.util.AttributesMap
addAll, clearAttributes, dump, dump, getAttribute, getAttributeEntrySet, getAttributeNames, getAttributeNamesCopy, getAttributeNameSet, removeAttribute, setAttribute, size, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.servlet.ServletContext
getAttribute, getAttributeNames, removeAttribute, setAttribute
-
Constructor Details
-
StaticContext
public StaticContext()
-
-
Method Details
-
getContext
- Specified by:
getContext
in interfacejavax.servlet.ServletContext
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersion
in interfacejavax.servlet.ServletContext
-
getMimeType
- Specified by:
getMimeType
in interfacejavax.servlet.ServletContext
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersion
in interfacejavax.servlet.ServletContext
-
getNamedDispatcher
- Specified by:
getNamedDispatcher
in interfacejavax.servlet.ServletContext
-
getRequestDispatcher
- Specified by:
getRequestDispatcher
in interfacejavax.servlet.ServletContext
-
getRealPath
- Specified by:
getRealPath
in interfacejavax.servlet.ServletContext
-
getResource
- Specified by:
getResource
in interfacejavax.servlet.ServletContext
- Throws:
MalformedURLException
-
getResourceAsStream
- Specified by:
getResourceAsStream
in interfacejavax.servlet.ServletContext
-
getResourcePaths
- Specified by:
getResourcePaths
in interfacejavax.servlet.ServletContext
-
getServerInfo
- Specified by:
getServerInfo
in interfacejavax.servlet.ServletContext
-
getServlet
@Deprecated(since="Servlet API 2.1") public javax.servlet.Servlet getServlet(String name) throws javax.servlet.ServletException Deprecated.- Specified by:
getServlet
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
getServletNames
Deprecated.- Specified by:
getServletNames
in interfacejavax.servlet.ServletContext
-
getServlets
Deprecated.- Specified by:
getServlets
in interfacejavax.servlet.ServletContext
-
log
Deprecated.- Specified by:
log
in interfacejavax.servlet.ServletContext
-
log
- Specified by:
log
in interfacejavax.servlet.ServletContext
-
log
- Specified by:
log
in interfacejavax.servlet.ServletContext
-
getInitParameter
- Specified by:
getInitParameter
in interfacejavax.servlet.ServletContext
-
getInitParameterNames
- Specified by:
getInitParameterNames
in interfacejavax.servlet.ServletContext
-
getServletContextName
- Specified by:
getServletContextName
in interfacejavax.servlet.ServletContext
-
getContextPath
- Specified by:
getContextPath
in interfacejavax.servlet.ServletContext
-
setInitParameter
- Specified by:
setInitParameter
in interfacejavax.servlet.ServletContext
-
addFilter
public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends javax.servlet.Filter> filterClass) - Specified by:
addFilter
in interfacejavax.servlet.ServletContext
-
addFilter
public javax.servlet.FilterRegistration.Dynamic addFilter(String filterName, javax.servlet.Filter filter) - Specified by:
addFilter
in interfacejavax.servlet.ServletContext
-
addFilter
- Specified by:
addFilter
in interfacejavax.servlet.ServletContext
-
addServlet
public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends javax.servlet.Servlet> servletClass) - Specified by:
addServlet
in interfacejavax.servlet.ServletContext
-
addServlet
public javax.servlet.ServletRegistration.Dynamic addServlet(String servletName, javax.servlet.Servlet servlet) - Specified by:
addServlet
in interfacejavax.servlet.ServletContext
-
addServlet
- Specified by:
addServlet
in interfacejavax.servlet.ServletContext
-
addJspFile
- Specified by:
addJspFile
in interfacejavax.servlet.ServletContext
- Since:
- Servlet 4.0
-
getDefaultSessionTrackingModes
- Specified by:
getDefaultSessionTrackingModes
in interfacejavax.servlet.ServletContext
-
getEffectiveSessionTrackingModes
- Specified by:
getEffectiveSessionTrackingModes
in interfacejavax.servlet.ServletContext
-
getFilterRegistration
- Specified by:
getFilterRegistration
in interfacejavax.servlet.ServletContext
-
getFilterRegistrations
- Specified by:
getFilterRegistrations
in interfacejavax.servlet.ServletContext
-
getServletRegistration
- Specified by:
getServletRegistration
in interfacejavax.servlet.ServletContext
-
getServletRegistrations
- Specified by:
getServletRegistrations
in interfacejavax.servlet.ServletContext
-
getSessionCookieConfig
public javax.servlet.SessionCookieConfig getSessionCookieConfig()- Specified by:
getSessionCookieConfig
in interfacejavax.servlet.ServletContext
-
setSessionTrackingModes
- Specified by:
setSessionTrackingModes
in interfacejavax.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejavax.servlet.ServletContext
-
createInstance
- Throws:
javax.servlet.ServletException
-
createListener
public <T extends EventListener> T createListener(Class<T> clazz) throws javax.servlet.ServletException - Specified by:
createListener
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
createServlet
public <T extends javax.servlet.Servlet> T createServlet(Class<T> clazz) throws javax.servlet.ServletException - Specified by:
createServlet
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
createFilter
public <T extends javax.servlet.Filter> T createFilter(Class<T> clazz) throws javax.servlet.ServletException - Specified by:
createFilter
in interfacejavax.servlet.ServletContext
- Throws:
javax.servlet.ServletException
-
getClassLoader
- Specified by:
getClassLoader
in interfacejavax.servlet.ServletContext
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()- Specified by:
getEffectiveMajorVersion
in interfacejavax.servlet.ServletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()- Specified by:
getEffectiveMinorVersion
in interfacejavax.servlet.ServletContext
-
setEffectiveMajorVersion
public void setEffectiveMajorVersion(int v) -
setEffectiveMinorVersion
public void setEffectiveMinorVersion(int v) -
getJspConfigDescriptor
public javax.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()- Specified by:
getJspConfigDescriptor
in interfacejavax.servlet.ServletContext
-
declareRoles
- Specified by:
declareRoles
in interfacejavax.servlet.ServletContext
-
getVirtualServerName
- Specified by:
getVirtualServerName
in interfacejavax.servlet.ServletContext
-
getSessionTimeout
public int getSessionTimeout()- Specified by:
getSessionTimeout
in interfacejavax.servlet.ServletContext
- Since:
- Servlet 4.0
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout) - Specified by:
setSessionTimeout
in interfacejavax.servlet.ServletContext
- Since:
- Servlet 4.0
-
getRequestCharacterEncoding
- Specified by:
getRequestCharacterEncoding
in interfacejavax.servlet.ServletContext
- Since:
- Servlet 4.0
-
setRequestCharacterEncoding
- Specified by:
setRequestCharacterEncoding
in interfacejavax.servlet.ServletContext
- Since:
- Servlet 4.0
-
getResponseCharacterEncoding
- Specified by:
getResponseCharacterEncoding
in interfacejavax.servlet.ServletContext
- Since:
- Servlet 4.0
-
setResponseCharacterEncoding
- Specified by:
setResponseCharacterEncoding
in interfacejavax.servlet.ServletContext
- Since:
- Servlet 4.0
-