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:
ServletContext
,Attributes
,Dumpable
- Enclosing class:
ServletContextHandler
@Deprecated(since="2021-05-27")
public class ServletContextHandler.Context
extends ContextHandler.Context
Deprecated.
-
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Add filter to context.Deprecated.Add filter to context.Deprecated.Add filter to context.void
addListener
(Class<? extends EventListener> listenerClass) Deprecated.TODO SERVLET3 - Add commentsvoid
addListener
(String className) Deprecated.TODO SERVLET3 - Add comments<T extends EventListener>
voidaddListener
(T t) Deprecated.TODO SERVLET3 - Add commentsaddServlet
(String servletName, Class<? extends Servlet> servletClass) Deprecated.Add servlet to context.addServlet
(String servletName, String className) Deprecated.Register a servlet implementation for use in this ServletContext.addServlet
(String servletName, Servlet servlet) Deprecated.Register a servlet instance for use in this ServletContext.void
declareRoles
(String... roleNames) Deprecated.Add to the declared roles for this ServletContext.<T extends Filter>
voiddestroyFilter
(T f) Deprecated.<T extends Servlet>
voiddestroyServlet
(T s) Deprecated.Deprecated.Obtains the default session tracking modes for this web application.Deprecated.Obtains the currently enabled session tracking modes for this web application.getFilterRegistration
(String filterName) Deprecated.TODO SERVLET3 - Add commentsMap
<String, ? extends FilterRegistration> Deprecated.Deprecated.getNamedDispatcher
(String name) Deprecated.Returns aRequestDispatcher
object that acts as a wrapper for the named servlet.getServletRegistration
(String servletName) Deprecated.Obtain the details of the named servlet.Map
<String, ? extends ServletRegistration> Deprecated.TODO SERVLET3 - Add commentsDeprecated.boolean
setInitParameter
(String name, String value) Deprecated.Set the given initialisation parameter to the given value.void
Deprecated.void
setSessionTrackingModes
(Set<SessionTrackingMode> sessionTrackingModes) Deprecated.Configures the available session tracking modes for this web application.Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler.Context
checkListener, getAttribute, getAttributeNames, getClassLoader, getContext, getContextHandler, getContextPath, getInitParameter, 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
createFilter, createListener, createServlet, 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()Deprecated.
-
-
Method Details
-
getNamedDispatcher
Deprecated.Description copied from interface:ServletContext
Returns aRequestDispatcher
object that acts as a wrapper for the named servlet.Servlets (and JSP pages also) may be given names via server administration or via a web application deployment descriptor. A servlet instance can determine its name using
ServletConfig.getServletName()
.This method returns
null
if theServletContext
cannot return aRequestDispatcher
for any reason.- Specified by:
getNamedDispatcher
in interfaceServletContext
- Overrides:
getNamedDispatcher
in classContextHandler.StaticContext
- Parameters:
name
- aString
specifying the name of a servlet to wrap- Returns:
- a
RequestDispatcher
object that acts as a wrapper for the named servlet, ornull
if theServletContext
cannot return aRequestDispatcher
- See Also:
-
addFilter
Deprecated.Description copied from interface:ServletContext
Add filter to context.- Specified by:
addFilter
in interfaceServletContext
- Overrides:
addFilter
in classContextHandler.StaticContext
- Parameters:
filterName
- Name of filter to addfilterClass
- Class of filter to add- Returns:
null
if the filter has already been fully defined, else aFilterRegistration.Dynamic
object that can be used to further configure the filter- Since:
- servlet-api-3.0
-
addFilter
Deprecated.Description copied from interface:ServletContext
Add filter to context.- Specified by:
addFilter
in interfaceServletContext
- Overrides:
addFilter
in classContextHandler.StaticContext
- Parameters:
filterName
- Name of filter to addclassName
- Name of filter class- Returns:
null
if the filter has already been fully defined, else aFilterRegistration.Dynamic
object that can be used to further configure the filter- Since:
- servlet-api-3.0
-
addFilter
Deprecated.Description copied from interface:ServletContext
Add filter to context.- Specified by:
addFilter
in interfaceServletContext
- Overrides:
addFilter
in classContextHandler.StaticContext
- Parameters:
filterName
- Name of filter to addfilter
- Filter to add- Returns:
null
if the filter has already been fully defined, else aFilterRegistration.Dynamic
object that can be used to further configure the filter- Since:
- servlet-api-3.0
-
addServlet
public ServletRegistration.Dynamic addServlet(String servletName, Class<? extends Servlet> servletClass) Deprecated.Description copied from interface:ServletContext
Add servlet to context.- Specified by:
addServlet
in interfaceServletContext
- Overrides:
addServlet
in classContextHandler.StaticContext
- Parameters:
servletName
- Name of servlet to addservletClass
- Class of servlet to add- Returns:
null
if the servlet has already been fully defined, else aServletRegistration.Dynamic
object that can be used to further configure the servlet- Since:
- servlet-api-3.0
-
addServlet
Deprecated.Description copied from interface:ServletContext
Register a servlet implementation for use in this ServletContext.- Specified by:
addServlet
in interfaceServletContext
- Overrides:
addServlet
in classContextHandler.StaticContext
- Parameters:
servletName
- The name of the servlet to registerclassName
- The implementation class for the servlet- Returns:
- The registration object that enables further configuration
- Since:
- servlet-api-3.0
-
addServlet
Deprecated.Description copied from interface:ServletContext
Register a servlet instance for use in this ServletContext.- Specified by:
addServlet
in interfaceServletContext
- Overrides:
addServlet
in classContextHandler.StaticContext
- Parameters:
servletName
- The name of the servlet to registerservlet
- The Servlet instance to register- Returns:
- The registration object that enables further configuration
- Since:
- servlet-api-3.0
-
setInitParameter
Deprecated.Description copied from interface:ServletContext
Set the given initialisation parameter to the given value.- Specified by:
setInitParameter
in interfaceServletContext
- Overrides:
setInitParameter
in classContextHandler.Context
- Parameters:
name
- Name of initialisation parametervalue
- Value for initialisation parameter- Returns:
true
if the call succeeds orfalse
if the call fails because an initialisation parameter with the same name has already been set
-
destroyFilter
Deprecated. -
destroyServlet
Deprecated. -
getDefaultSessionTrackingModes
Deprecated.Description copied from interface:ServletContext
Obtains the default session tracking modes for this web application. By defaultSessionTrackingMode.URL
is always supported,SessionTrackingMode.COOKIE
is supported unless thecookies
attribute has been set tofalse
for the context andSessionTrackingMode.SSL
is supported if at least one of the connectors used by this context has the attributesecure
set totrue
.- Specified by:
getDefaultSessionTrackingModes
in interfaceServletContext
- Overrides:
getDefaultSessionTrackingModes
in classContextHandler.StaticContext
- Returns:
- The set of default session tracking modes for this web application
-
getEffectiveSessionTrackingModes
Deprecated.Description copied from interface:ServletContext
Obtains the currently enabled session tracking modes for this web application.- Specified by:
getEffectiveSessionTrackingModes
in interfaceServletContext
- Overrides:
getEffectiveSessionTrackingModes
in classContextHandler.StaticContext
- Returns:
- The value supplied via
ServletContext.setSessionTrackingModes(Set)
if one was previously set, else return the defaults
-
getFilterRegistration
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
getFilterRegistration
in interfaceServletContext
- Overrides:
getFilterRegistration
in classContextHandler.StaticContext
- Parameters:
filterName
- TODO- Returns:
- TODO
-
getFilterRegistrations
Deprecated.- Specified by:
getFilterRegistrations
in interfaceServletContext
- Overrides:
getFilterRegistrations
in classContextHandler.StaticContext
- Returns:
- TODO
-
getServletRegistration
Deprecated.Description copied from interface:ServletContext
Obtain the details of the named servlet.- Specified by:
getServletRegistration
in interfaceServletContext
- Overrides:
getServletRegistration
in classContextHandler.StaticContext
- Parameters:
servletName
- The name of the Servlet of interest- Returns:
- The registration details for the named Servlet or
null
if no Servlet has been registered with the given name
-
getServletRegistrations
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
getServletRegistrations
in interfaceServletContext
- Overrides:
getServletRegistrations
in classContextHandler.StaticContext
- Returns:
- TODO
-
getSessionCookieConfig
Deprecated.- Specified by:
getSessionCookieConfig
in interfaceServletContext
- Overrides:
getSessionCookieConfig
in classContextHandler.StaticContext
- Returns:
- TODO
-
setSessionTrackingModes
Deprecated.Description copied from interface:ServletContext
Configures the available session tracking modes for this web application.- Specified by:
setSessionTrackingModes
in interfaceServletContext
- Overrides:
setSessionTrackingModes
in classContextHandler.StaticContext
- Parameters:
sessionTrackingModes
- The session tracking modes to use for this web application
-
addListener
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
addListener
in interfaceServletContext
- Overrides:
addListener
in classContextHandler.Context
- Parameters:
className
- TODO
-
addListener
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
addListener
in interfaceServletContext
- Overrides:
addListener
in classContextHandler.Context
- Type Parameters:
T
- TODO- Parameters:
t
- TODO
-
addListener
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
addListener
in interfaceServletContext
- Overrides:
addListener
in classContextHandler.Context
- Parameters:
listenerClass
- TODO
-
getJspConfigDescriptor
Deprecated.- Specified by:
getJspConfigDescriptor
in interfaceServletContext
- Overrides:
getJspConfigDescriptor
in classContextHandler.Context
- Returns:
- TODO
-
setJspConfigDescriptor
Deprecated.- Overrides:
setJspConfigDescriptor
in classContextHandler.Context
-
declareRoles
Deprecated.Description copied from interface:ServletContext
Add to the declared roles for this ServletContext.- Specified by:
declareRoles
in interfaceServletContext
- Overrides:
declareRoles
in classContextHandler.Context
- Parameters:
roleNames
- The roles to add
-