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:
jakarta.servlet.ServletContext
,Attributes
,Dumpable
- Direct Known Subclasses:
ContextHandler.Context
- Enclosing class:
- ContextHandler
public static class ContextHandler.StaticContext
extends AttributesMap
implements jakarta.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 jakarta.servlet.ServletContext
ORDERED_LIBS, TEMPDIR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.servlet.FilterRegistration.Dynamic
jakarta.servlet.FilterRegistration.Dynamic
jakarta.servlet.FilterRegistration.Dynamic
jakarta.servlet.ServletRegistration.Dynamic
addJspFile
(String servletName, String jspFile) void
addListener
(Class<? extends EventListener> listenerClass) void
addListener
(String className) <T extends EventListener>
voidaddListener
(T t) jakarta.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, jakarta.servlet.Servlet servlet) jakarta.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, Class<? extends jakarta.servlet.Servlet> servletClass) jakarta.servlet.ServletRegistration.Dynamic
addServlet
(String servletName, String className) <T extends jakarta.servlet.Filter>
TcreateFilter
(Class<T> clazz) <T> T
createInstance
(Class<T> clazz) <T extends EventListener>
TcreateListener
(Class<T> clazz) <T extends jakarta.servlet.Servlet>
TcreateServlet
(Class<T> clazz) void
declareRoles
(String... roleNames) jakarta.servlet.ServletContext
getContext
(String uripath) Set<jakarta.servlet.SessionTrackingMode>
int
int
Set<jakarta.servlet.SessionTrackingMode>
jakarta.servlet.FilterRegistration
getFilterRegistration
(String filterName) getInitParameter
(String name) jakarta.servlet.descriptor.JspConfigDescriptor
int
getMimeType
(String file) int
jakarta.servlet.RequestDispatcher
getNamedDispatcher
(String name) getRealPath
(String path) jakarta.servlet.RequestDispatcher
getRequestDispatcher
(String uriInContext) getResource
(String path) getResourceAsStream
(String path) getResourcePaths
(String path) jakarta.servlet.Servlet
getServlet
(String name) Deprecated.Deprecated.jakarta.servlet.ServletRegistration
getServletRegistration
(String servletName) Enumeration<jakarta.servlet.Servlet>
Deprecated.jakarta.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<jakarta.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 jakarta.servlet.ServletContext
getAttribute, getAttributeNames, removeAttribute, setAttribute
-
Constructor Details
-
StaticContext
public StaticContext()
-
-
Method Details
-
getContext
- Specified by:
getContext
in interfacejakarta.servlet.ServletContext
-
getMajorVersion
public int getMajorVersion()- Specified by:
getMajorVersion
in interfacejakarta.servlet.ServletContext
-
getMimeType
- Specified by:
getMimeType
in interfacejakarta.servlet.ServletContext
-
getMinorVersion
public int getMinorVersion()- Specified by:
getMinorVersion
in interfacejakarta.servlet.ServletContext
-
getNamedDispatcher
- Specified by:
getNamedDispatcher
in interfacejakarta.servlet.ServletContext
-
getRequestDispatcher
- Specified by:
getRequestDispatcher
in interfacejakarta.servlet.ServletContext
-
getRealPath
- Specified by:
getRealPath
in interfacejakarta.servlet.ServletContext
-
getResource
- Specified by:
getResource
in interfacejakarta.servlet.ServletContext
- Throws:
MalformedURLException
-
getResourceAsStream
- Specified by:
getResourceAsStream
in interfacejakarta.servlet.ServletContext
-
getResourcePaths
- Specified by:
getResourcePaths
in interfacejakarta.servlet.ServletContext
-
getServerInfo
- Specified by:
getServerInfo
in interfacejakarta.servlet.ServletContext
-
getServlet
@Deprecated(since="Servlet API 2.1") public jakarta.servlet.Servlet getServlet(String name) throws jakarta.servlet.ServletException Deprecated.- Specified by:
getServlet
in interfacejakarta.servlet.ServletContext
- Throws:
jakarta.servlet.ServletException
-
getServletNames
Deprecated.- Specified by:
getServletNames
in interfacejakarta.servlet.ServletContext
-
getServlets
Deprecated.- Specified by:
getServlets
in interfacejakarta.servlet.ServletContext
-
log
Deprecated.- Specified by:
log
in interfacejakarta.servlet.ServletContext
-
log
- Specified by:
log
in interfacejakarta.servlet.ServletContext
-
log
- Specified by:
log
in interfacejakarta.servlet.ServletContext
-
getInitParameter
- Specified by:
getInitParameter
in interfacejakarta.servlet.ServletContext
-
getInitParameterNames
- Specified by:
getInitParameterNames
in interfacejakarta.servlet.ServletContext
-
getServletContextName
- Specified by:
getServletContextName
in interfacejakarta.servlet.ServletContext
-
getContextPath
- Specified by:
getContextPath
in interfacejakarta.servlet.ServletContext
-
setInitParameter
- Specified by:
setInitParameter
in interfacejakarta.servlet.ServletContext
-
addFilter
public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends jakarta.servlet.Filter> filterClass) - Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
-
addFilter
public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, jakarta.servlet.Filter filter) - Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
-
addFilter
- Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
-
addServlet
public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends jakarta.servlet.Servlet> servletClass) - Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
-
addServlet
public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, jakarta.servlet.Servlet servlet) - Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
-
addServlet
- Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
-
addJspFile
- Specified by:
addJspFile
in interfacejakarta.servlet.ServletContext
- Since:
- Servlet 4.0
-
getDefaultSessionTrackingModes
- Specified by:
getDefaultSessionTrackingModes
in interfacejakarta.servlet.ServletContext
-
getEffectiveSessionTrackingModes
- Specified by:
getEffectiveSessionTrackingModes
in interfacejakarta.servlet.ServletContext
-
getFilterRegistration
- Specified by:
getFilterRegistration
in interfacejakarta.servlet.ServletContext
-
getFilterRegistrations
- Specified by:
getFilterRegistrations
in interfacejakarta.servlet.ServletContext
-
getServletRegistration
- Specified by:
getServletRegistration
in interfacejakarta.servlet.ServletContext
-
getServletRegistrations
- Specified by:
getServletRegistrations
in interfacejakarta.servlet.ServletContext
-
getSessionCookieConfig
public jakarta.servlet.SessionCookieConfig getSessionCookieConfig()- Specified by:
getSessionCookieConfig
in interfacejakarta.servlet.ServletContext
-
setSessionTrackingModes
- Specified by:
setSessionTrackingModes
in interfacejakarta.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
-
createInstance
- Throws:
jakarta.servlet.ServletException
-
createListener
public <T extends EventListener> T createListener(Class<T> clazz) throws jakarta.servlet.ServletException - Specified by:
createListener
in interfacejakarta.servlet.ServletContext
- Throws:
jakarta.servlet.ServletException
-
createServlet
public <T extends jakarta.servlet.Servlet> T createServlet(Class<T> clazz) throws jakarta.servlet.ServletException - Specified by:
createServlet
in interfacejakarta.servlet.ServletContext
- Throws:
jakarta.servlet.ServletException
-
createFilter
public <T extends jakarta.servlet.Filter> T createFilter(Class<T> clazz) throws jakarta.servlet.ServletException - Specified by:
createFilter
in interfacejakarta.servlet.ServletContext
- Throws:
jakarta.servlet.ServletException
-
getClassLoader
- Specified by:
getClassLoader
in interfacejakarta.servlet.ServletContext
-
getEffectiveMajorVersion
public int getEffectiveMajorVersion()- Specified by:
getEffectiveMajorVersion
in interfacejakarta.servlet.ServletContext
-
getEffectiveMinorVersion
public int getEffectiveMinorVersion()- Specified by:
getEffectiveMinorVersion
in interfacejakarta.servlet.ServletContext
-
setEffectiveMajorVersion
public void setEffectiveMajorVersion(int v) -
setEffectiveMinorVersion
public void setEffectiveMinorVersion(int v) -
getJspConfigDescriptor
public jakarta.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()- Specified by:
getJspConfigDescriptor
in interfacejakarta.servlet.ServletContext
-
declareRoles
- Specified by:
declareRoles
in interfacejakarta.servlet.ServletContext
-
getVirtualServerName
- Specified by:
getVirtualServerName
in interfacejakarta.servlet.ServletContext
-
getSessionTimeout
public int getSessionTimeout()- Specified by:
getSessionTimeout
in interfacejakarta.servlet.ServletContext
- Since:
- Servlet 4.0
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout) - Specified by:
setSessionTimeout
in interfacejakarta.servlet.ServletContext
- Since:
- Servlet 4.0
-
getRequestCharacterEncoding
- Specified by:
getRequestCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Since:
- Servlet 4.0
-
setRequestCharacterEncoding
- Specified by:
setRequestCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Since:
- Servlet 4.0
-
getResponseCharacterEncoding
- Specified by:
getResponseCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Since:
- Servlet 4.0
-
setResponseCharacterEncoding
- Specified by:
setResponseCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Since:
- Servlet 4.0
-