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
- Direct Known Subclasses:
WebAppContext.Context
- 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 Constructor Description Context()
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description FilterRegistration.Dynamic
addFilter(java.lang.String filterName, java.lang.Class<? extends Filter> filterClass)
Deprecated.Add filter to context.FilterRegistration.Dynamic
addFilter(java.lang.String filterName, java.lang.String className)
Deprecated.Add filter to context.FilterRegistration.Dynamic
addFilter(java.lang.String filterName, Filter filter)
Deprecated.Add filter to context.void
addListener(java.lang.Class<? extends java.util.EventListener> listenerClass)
Deprecated.TODO SERVLET3 - Add commentsvoid
addListener(java.lang.String className)
Deprecated.TODO SERVLET3 - Add comments<T extends java.util.EventListener>
voidaddListener(T t)
Deprecated.TODO SERVLET3 - Add commentsServletRegistration.Dynamic
addServlet(java.lang.String servletName, java.lang.Class<? extends Servlet> servletClass)
Deprecated.Add servlet to context.ServletRegistration.Dynamic
addServlet(java.lang.String servletName, java.lang.String className)
Deprecated.Register a servlet implementation for use in this ServletContext.ServletRegistration.Dynamic
addServlet(java.lang.String servletName, Servlet servlet)
Deprecated.Register a servlet instance for use in this ServletContext.void
declareRoles(java.lang.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.java.util.Set<SessionTrackingMode>
getDefaultSessionTrackingModes()
Deprecated.Obtains the default session tracking modes for this web application.java.util.Set<SessionTrackingMode>
getEffectiveSessionTrackingModes()
Deprecated.Obtains the currently enabled session tracking modes for this web application.FilterRegistration
getFilterRegistration(java.lang.String filterName)
Deprecated.TODO SERVLET3 - Add commentsjava.util.Map<java.lang.String,? extends FilterRegistration>
getFilterRegistrations()
Deprecated.JspConfigDescriptor
getJspConfigDescriptor()
Deprecated.RequestDispatcher
getNamedDispatcher(java.lang.String name)
Deprecated.Returns aRequestDispatcher
object that acts as a wrapper for the named servlet.ServletRegistration
getServletRegistration(java.lang.String servletName)
Deprecated.Obtain the details of the named servlet.java.util.Map<java.lang.String,? extends ServletRegistration>
getServletRegistrations()
Deprecated.TODO SERVLET3 - Add commentsSessionCookieConfig
getSessionCookieConfig()
Deprecated.boolean
setInitParameter(java.lang.String name, java.lang.String value)
Deprecated.Set the given initialisation parameter to the given value.void
setJspConfigDescriptor(JspConfigDescriptor d)
Deprecated.void
setSessionTrackingModes(java.util.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
-
-
-
-
Method Detail
-
getNamedDispatcher
public RequestDispatcher getNamedDispatcher(java.lang.String name)
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:
RequestDispatcher
,ServletContext.getContext(java.lang.String)
,ServletConfig.getServletName()
-
addFilter
public FilterRegistration.Dynamic addFilter(java.lang.String filterName, java.lang.Class<? extends Filter> filterClass)
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
public FilterRegistration.Dynamic addFilter(java.lang.String filterName, java.lang.String className)
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
public FilterRegistration.Dynamic addFilter(java.lang.String filterName, Filter filter)
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(java.lang.String servletName, java.lang.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
public ServletRegistration.Dynamic addServlet(java.lang.String servletName, java.lang.String className)
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
public ServletRegistration.Dynamic addServlet(java.lang.String servletName, Servlet servlet)
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
public boolean setInitParameter(java.lang.String name, java.lang.String value)
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
public <T extends Filter> void destroyFilter(T f)
Deprecated.
-
destroyServlet
public <T extends Servlet> void destroyServlet(T s)
Deprecated.
-
getDefaultSessionTrackingModes
public java.util.Set<SessionTrackingMode> 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
public java.util.Set<SessionTrackingMode> 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
public FilterRegistration getFilterRegistration(java.lang.String filterName)
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
public java.util.Map<java.lang.String,? extends FilterRegistration> getFilterRegistrations()
Deprecated.- Specified by:
getFilterRegistrations
in interfaceServletContext
- Overrides:
getFilterRegistrations
in classContextHandler.StaticContext
- Returns:
- TODO
-
getServletRegistration
public ServletRegistration getServletRegistration(java.lang.String servletName)
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
public java.util.Map<java.lang.String,? extends ServletRegistration> getServletRegistrations()
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
getServletRegistrations
in interfaceServletContext
- Overrides:
getServletRegistrations
in classContextHandler.StaticContext
- Returns:
- TODO
-
getSessionCookieConfig
public SessionCookieConfig getSessionCookieConfig()
Deprecated.- Specified by:
getSessionCookieConfig
in interfaceServletContext
- Overrides:
getSessionCookieConfig
in classContextHandler.StaticContext
- Returns:
- TODO
-
setSessionTrackingModes
public void setSessionTrackingModes(java.util.Set<SessionTrackingMode> sessionTrackingModes)
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
public void addListener(java.lang.String className)
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
addListener
in interfaceServletContext
- Overrides:
addListener
in classContextHandler.Context
- Parameters:
className
- TODO
-
addListener
public <T extends java.util.EventListener> void addListener(T t)
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
public void addListener(java.lang.Class<? extends java.util.EventListener> listenerClass)
Deprecated.Description copied from interface:ServletContext
TODO SERVLET3 - Add comments- Specified by:
addListener
in interfaceServletContext
- Overrides:
addListener
in classContextHandler.Context
- Parameters:
listenerClass
- TODO
-
getJspConfigDescriptor
public JspConfigDescriptor getJspConfigDescriptor()
Deprecated.- Specified by:
getJspConfigDescriptor
in interfaceServletContext
- Overrides:
getJspConfigDescriptor
in classContextHandler.Context
- Returns:
- TODO
-
setJspConfigDescriptor
public void setJspConfigDescriptor(JspConfigDescriptor d)
Deprecated.- Overrides:
setJspConfigDescriptor
in classContextHandler.Context
-
declareRoles
public void declareRoles(java.lang.String... roleNames)
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
-
-