Package org.eclipse.jetty.servlet
Class ServletContextHandler.Context
java.lang.Object
org.eclipse.jetty.util.AttributesMap
org.eclipse.jetty.server.handler.ContextHandler.StaticContext
org.eclipse.jetty.server.handler.ContextHandler.Context
org.eclipse.jetty.servlet.ServletContextHandler.Context
- All Implemented Interfaces:
jakarta.servlet.ServletContext
,Attributes
,Dumpable
- Direct Known Subclasses:
WebAppContext.Context
- Enclosing class:
- ServletContextHandler
-
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 class org.eclipse.jetty.server.handler.ContextHandler.Context
_enabled, _extendedListenerTypes
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> T
createInstance
(BaseHolder<T> holder) <T extends EventListener>
TcreateListener
(Class<T> clazz) <T extends jakarta.servlet.Servlet>
TcreateServlet
(Class<T> clazz) void
declareRoles
(String... roleNames) <T extends jakarta.servlet.Filter>
voiddestroyFilter
(T f) <T extends jakarta.servlet.Servlet>
voiddestroyServlet
(T s) Set<jakarta.servlet.SessionTrackingMode>
Set<jakarta.servlet.SessionTrackingMode>
jakarta.servlet.FilterRegistration
getFilterRegistration
(String filterName) getInitParameter
(String name) jakarta.servlet.descriptor.JspConfigDescriptor
jakarta.servlet.RequestDispatcher
getNamedDispatcher
(String name) jakarta.servlet.ServletRegistration
getServletRegistration
(String servletName) jakarta.servlet.SessionCookieConfig
int
boolean
setInitParameter
(String name, String value) void
setJspConfigDescriptor
(jakarta.servlet.descriptor.JspConfigDescriptor d) 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.server.handler.ContextHandler.Context
checkListener, getAttribute, getAttributeNames, getClassLoader, getContext, getContextHandler, getContextPath, getInitParameterNames, getMimeType, getRealPath, getRequestDispatcher, getResource, getResourceAsStream, getResourcePaths, getServletContextName, getVirtualServerName, isEnabled, isExtendedListenerTypes, log, log, log, removeAttribute, setAttribute, setEnabled, setExtendedListenerTypes, toString
Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler.StaticContext
getEffectiveMajorVersion, getEffectiveMinorVersion, getMajorVersion, getMinorVersion, getServerInfo, getServlet, getServletNames, getServlets, setEffectiveMajorVersion, setEffectiveMinorVersion
Methods inherited from class org.eclipse.jetty.util.AttributesMap
addAll, clearAttributes, dump, dump, getAttributeEntrySet, getAttributeNamesCopy, getAttributeNameSet, size
-
Constructor Details
-
Context
public Context()
-
-
Method Details
-
getNamedDispatcher
- Specified by:
getNamedDispatcher
in interfacejakarta.servlet.ServletContext
- Overrides:
getNamedDispatcher
in classContextHandler.StaticContext
-
addFilter
public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, Class<? extends jakarta.servlet.Filter> filterClass) - Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
- Overrides:
addFilter
in classContextHandler.StaticContext
- Since:
- servlet-api-3.0
-
addFilter
- Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
- Overrides:
addFilter
in classContextHandler.StaticContext
- Since:
- servlet-api-3.0
-
addFilter
public jakarta.servlet.FilterRegistration.Dynamic addFilter(String filterName, jakarta.servlet.Filter filter) - Specified by:
addFilter
in interfacejakarta.servlet.ServletContext
- Overrides:
addFilter
in classContextHandler.StaticContext
- Since:
- servlet-api-3.0
-
addServlet
public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, Class<? extends jakarta.servlet.Servlet> servletClass) - Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
- Overrides:
addServlet
in classContextHandler.StaticContext
- Since:
- servlet-api-3.0
-
addServlet
- Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
- Overrides:
addServlet
in classContextHandler.StaticContext
- Since:
- servlet-api-3.0
-
addServlet
public jakarta.servlet.ServletRegistration.Dynamic addServlet(String servletName, jakarta.servlet.Servlet servlet) - Specified by:
addServlet
in interfacejakarta.servlet.ServletContext
- Overrides:
addServlet
in classContextHandler.StaticContext
- Since:
- servlet-api-3.0
-
addJspFile
- Specified by:
addJspFile
in interfacejakarta.servlet.ServletContext
- Overrides:
addJspFile
in classContextHandler.StaticContext
-
getInitParameter
- Specified by:
getInitParameter
in interfacejakarta.servlet.ServletContext
- Overrides:
getInitParameter
in classContextHandler.Context
-
setInitParameter
- Specified by:
setInitParameter
in interfacejakarta.servlet.ServletContext
- Overrides:
setInitParameter
in classContextHandler.Context
-
createInstance
- Overrides:
createInstance
in classContextHandler.StaticContext
- Throws:
jakarta.servlet.ServletException
-
createInstance
- Throws:
jakarta.servlet.ServletException
-
destroyFilter
public <T extends jakarta.servlet.Filter> void destroyFilter(T f) -
destroyServlet
public <T extends jakarta.servlet.Servlet> void destroyServlet(T s) -
getDefaultSessionTrackingModes
- Specified by:
getDefaultSessionTrackingModes
in interfacejakarta.servlet.ServletContext
- Overrides:
getDefaultSessionTrackingModes
in classContextHandler.StaticContext
-
getEffectiveSessionTrackingModes
- Specified by:
getEffectiveSessionTrackingModes
in interfacejakarta.servlet.ServletContext
- Overrides:
getEffectiveSessionTrackingModes
in classContextHandler.StaticContext
-
getFilterRegistration
- Specified by:
getFilterRegistration
in interfacejakarta.servlet.ServletContext
- Overrides:
getFilterRegistration
in classContextHandler.StaticContext
-
getFilterRegistrations
- Specified by:
getFilterRegistrations
in interfacejakarta.servlet.ServletContext
- Overrides:
getFilterRegistrations
in classContextHandler.StaticContext
-
getServletRegistration
- Specified by:
getServletRegistration
in interfacejakarta.servlet.ServletContext
- Overrides:
getServletRegistration
in classContextHandler.StaticContext
-
getServletRegistrations
- Specified by:
getServletRegistrations
in interfacejakarta.servlet.ServletContext
- Overrides:
getServletRegistrations
in classContextHandler.StaticContext
-
getSessionCookieConfig
public jakarta.servlet.SessionCookieConfig getSessionCookieConfig()- Specified by:
getSessionCookieConfig
in interfacejakarta.servlet.ServletContext
- Overrides:
getSessionCookieConfig
in classContextHandler.StaticContext
-
setSessionTrackingModes
- Specified by:
setSessionTrackingModes
in interfacejakarta.servlet.ServletContext
- Overrides:
setSessionTrackingModes
in classContextHandler.StaticContext
-
getSessionTimeout
public int getSessionTimeout()- Specified by:
getSessionTimeout
in interfacejakarta.servlet.ServletContext
- Overrides:
getSessionTimeout
in classContextHandler.StaticContext
-
setSessionTimeout
public void setSessionTimeout(int sessionTimeout) - Specified by:
setSessionTimeout
in interfacejakarta.servlet.ServletContext
- Overrides:
setSessionTimeout
in classContextHandler.StaticContext
-
createServlet
public <T extends jakarta.servlet.Servlet> T createServlet(Class<T> clazz) throws jakarta.servlet.ServletException - Specified by:
createServlet
in interfacejakarta.servlet.ServletContext
- Overrides:
createServlet
in classContextHandler.StaticContext
- 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
- Overrides:
createFilter
in classContextHandler.StaticContext
- 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
- Overrides:
createListener
in classContextHandler.StaticContext
- Throws:
jakarta.servlet.ServletException
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
- Overrides:
addListener
in classContextHandler.Context
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
- Overrides:
addListener
in classContextHandler.Context
-
addListener
- Specified by:
addListener
in interfacejakarta.servlet.ServletContext
- Overrides:
addListener
in classContextHandler.Context
-
getJspConfigDescriptor
public jakarta.servlet.descriptor.JspConfigDescriptor getJspConfigDescriptor()- Specified by:
getJspConfigDescriptor
in interfacejakarta.servlet.ServletContext
- Overrides:
getJspConfigDescriptor
in classContextHandler.Context
-
setJspConfigDescriptor
public void setJspConfigDescriptor(jakarta.servlet.descriptor.JspConfigDescriptor d) - Overrides:
setJspConfigDescriptor
in classContextHandler.Context
-
declareRoles
- Specified by:
declareRoles
in interfacejakarta.servlet.ServletContext
- Overrides:
declareRoles
in classContextHandler.Context
-
getRequestCharacterEncoding
- Specified by:
getRequestCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Overrides:
getRequestCharacterEncoding
in classContextHandler.StaticContext
-
setRequestCharacterEncoding
- Specified by:
setRequestCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Overrides:
setRequestCharacterEncoding
in classContextHandler.StaticContext
-
getResponseCharacterEncoding
- Specified by:
getResponseCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Overrides:
getResponseCharacterEncoding
in classContextHandler.StaticContext
-
setResponseCharacterEncoding
- Specified by:
setResponseCharacterEncoding
in interfacejakarta.servlet.ServletContext
- Overrides:
setResponseCharacterEncoding
in classContextHandler.StaticContext
-