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.WrapperNested 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.voidaddListener(Class<? extends EventListener> listenerClass) Deprecated.TODO SERVLET3 - Add commentsvoidaddListener(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.voiddeclareRoles(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 aRequestDispatcherobject 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.booleansetInitParameter(String name, String value) Deprecated.Set the given initialisation parameter to the given value.voidDeprecated.voidsetSessionTrackingModes(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, toStringMethods inherited from class org.eclipse.jetty.server.handler.ContextHandler.StaticContext
createFilter, createListener, createServlet, getEffectiveMajorVersion, getEffectiveMinorVersion, getMajorVersion, getMinorVersion, getServerInfo, getServlet, getServletNames, getServlets, setEffectiveMajorVersion, setEffectiveMinorVersionMethods 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:ServletContextReturns aRequestDispatcherobject 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
nullif theServletContextcannot return aRequestDispatcherfor any reason.- Specified by:
getNamedDispatcherin interfaceServletContext- Overrides:
getNamedDispatcherin classContextHandler.StaticContext- Parameters:
name- aStringspecifying the name of a servlet to wrap- Returns:
- a
RequestDispatcherobject that acts as a wrapper for the named servlet, ornullif theServletContextcannot return aRequestDispatcher - See Also:
-
addFilter
Deprecated.Description copied from interface:ServletContextAdd filter to context.- Specified by:
addFilterin interfaceServletContext- Overrides:
addFilterin classContextHandler.StaticContext- Parameters:
filterName- Name of filter to addfilterClass- Class of filter to add- Returns:
nullif the filter has already been fully defined, else aFilterRegistration.Dynamicobject that can be used to further configure the filter- Since:
- servlet-api-3.0
-
addFilter
Deprecated.Description copied from interface:ServletContextAdd filter to context.- Specified by:
addFilterin interfaceServletContext- Overrides:
addFilterin classContextHandler.StaticContext- Parameters:
filterName- Name of filter to addclassName- Name of filter class- Returns:
nullif the filter has already been fully defined, else aFilterRegistration.Dynamicobject that can be used to further configure the filter- Since:
- servlet-api-3.0
-
addFilter
Deprecated.Description copied from interface:ServletContextAdd filter to context.- Specified by:
addFilterin interfaceServletContext- Overrides:
addFilterin classContextHandler.StaticContext- Parameters:
filterName- Name of filter to addfilter- Filter to add- Returns:
nullif the filter has already been fully defined, else aFilterRegistration.Dynamicobject 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:ServletContextAdd servlet to context.- Specified by:
addServletin interfaceServletContext- Overrides:
addServletin classContextHandler.StaticContext- Parameters:
servletName- Name of servlet to addservletClass- Class of servlet to add- Returns:
nullif the servlet has already been fully defined, else aServletRegistration.Dynamicobject that can be used to further configure the servlet- Since:
- servlet-api-3.0
-
addServlet
Deprecated.Description copied from interface:ServletContextRegister a servlet implementation for use in this ServletContext.- Specified by:
addServletin interfaceServletContext- Overrides:
addServletin 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:ServletContextRegister a servlet instance for use in this ServletContext.- Specified by:
addServletin interfaceServletContext- Overrides:
addServletin 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:ServletContextSet the given initialisation parameter to the given value.- Specified by:
setInitParameterin interfaceServletContext- Overrides:
setInitParameterin classContextHandler.Context- Parameters:
name- Name of initialisation parametervalue- Value for initialisation parameter- Returns:
trueif the call succeeds orfalseif 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:ServletContextObtains the default session tracking modes for this web application. By defaultSessionTrackingMode.URLis always supported,SessionTrackingMode.COOKIEis supported unless thecookiesattribute has been set tofalsefor the context andSessionTrackingMode.SSLis supported if at least one of the connectors used by this context has the attributesecureset totrue.- Specified by:
getDefaultSessionTrackingModesin interfaceServletContext- Overrides:
getDefaultSessionTrackingModesin classContextHandler.StaticContext- Returns:
- The set of default session tracking modes for this web application
-
getEffectiveSessionTrackingModes
Deprecated.Description copied from interface:ServletContextObtains the currently enabled session tracking modes for this web application.- Specified by:
getEffectiveSessionTrackingModesin interfaceServletContext- Overrides:
getEffectiveSessionTrackingModesin 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:ServletContextTODO SERVLET3 - Add comments- Specified by:
getFilterRegistrationin interfaceServletContext- Overrides:
getFilterRegistrationin classContextHandler.StaticContext- Parameters:
filterName- TODO- Returns:
- TODO
-
getFilterRegistrations
Deprecated.- Specified by:
getFilterRegistrationsin interfaceServletContext- Overrides:
getFilterRegistrationsin classContextHandler.StaticContext- Returns:
- TODO
-
getServletRegistration
Deprecated.Description copied from interface:ServletContextObtain the details of the named servlet.- Specified by:
getServletRegistrationin interfaceServletContext- Overrides:
getServletRegistrationin classContextHandler.StaticContext- Parameters:
servletName- The name of the Servlet of interest- Returns:
- The registration details for the named Servlet or
nullif no Servlet has been registered with the given name
-
getServletRegistrations
Deprecated.Description copied from interface:ServletContextTODO SERVLET3 - Add comments- Specified by:
getServletRegistrationsin interfaceServletContext- Overrides:
getServletRegistrationsin classContextHandler.StaticContext- Returns:
- TODO
-
getSessionCookieConfig
Deprecated.- Specified by:
getSessionCookieConfigin interfaceServletContext- Overrides:
getSessionCookieConfigin classContextHandler.StaticContext- Returns:
- TODO
-
setSessionTrackingModes
Deprecated.Description copied from interface:ServletContextConfigures the available session tracking modes for this web application.- Specified by:
setSessionTrackingModesin interfaceServletContext- Overrides:
setSessionTrackingModesin classContextHandler.StaticContext- Parameters:
sessionTrackingModes- The session tracking modes to use for this web application
-
addListener
Deprecated.Description copied from interface:ServletContextTODO SERVLET3 - Add comments- Specified by:
addListenerin interfaceServletContext- Overrides:
addListenerin classContextHandler.Context- Parameters:
className- TODO
-
addListener
Deprecated.Description copied from interface:ServletContextTODO SERVLET3 - Add comments- Specified by:
addListenerin interfaceServletContext- Overrides:
addListenerin classContextHandler.Context- Type Parameters:
T- TODO- Parameters:
t- TODO
-
addListener
Deprecated.Description copied from interface:ServletContextTODO SERVLET3 - Add comments- Specified by:
addListenerin interfaceServletContext- Overrides:
addListenerin classContextHandler.Context- Parameters:
listenerClass- TODO
-
getJspConfigDescriptor
Deprecated.- Specified by:
getJspConfigDescriptorin interfaceServletContext- Overrides:
getJspConfigDescriptorin classContextHandler.Context- Returns:
- TODO
-
setJspConfigDescriptor
Deprecated.- Overrides:
setJspConfigDescriptorin classContextHandler.Context
-
declareRoles
Deprecated.Description copied from interface:ServletContextAdd to the declared roles for this ServletContext.- Specified by:
declareRolesin interfaceServletContext- Overrides:
declareRolesin classContextHandler.Context- Parameters:
roleNames- The roles to add
-