Class WebAppContext.Context
- java.lang.Object
 
- 
- All Implemented Interfaces:
 ServletContext,Attributes,Dumpable
- Enclosing class:
 - WebAppContext
 
@Deprecated(since="2021-05-27") public class WebAppContext.Context extends ServletContextHandler.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 voidcheckListener(java.lang.Class<? extends java.util.EventListener> listener)Deprecated.ServletContextgetContext(java.lang.String uripath)Deprecated.Returns aServletContextobject that corresponds to a specified URL on the server.java.net.URLgetResource(java.lang.String path)Deprecated.Returns a URL to the resource that is mapped to a specified path.- 
Methods inherited from class org.eclipse.jetty.servlet.ServletContextHandler.Context
addFilter, addFilter, addFilter, addListener, addListener, addListener, addServlet, addServlet, addServlet, declareRoles, destroyFilter, destroyServlet, getDefaultSessionTrackingModes, getEffectiveSessionTrackingModes, getFilterRegistration, getFilterRegistrations, getJspConfigDescriptor, getNamedDispatcher, getServletRegistration, getServletRegistrations, getSessionCookieConfig, setInitParameter, setJspConfigDescriptor, setSessionTrackingModes 
- 
Methods inherited from class org.eclipse.jetty.server.handler.ContextHandler.Context
getAttribute, getAttributeNames, getClassLoader, getContextHandler, getContextPath, getInitParameter, getInitParameterNames, getMimeType, getRealPath, getRequestDispatcher, 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
- 
checkListener
public void checkListener(java.lang.Class<? extends java.util.EventListener> listener) throws java.lang.IllegalStateExceptionDeprecated.- Overrides:
 checkListenerin classContextHandler.Context- Throws:
 java.lang.IllegalStateException
 
- 
getResource
public java.net.URL getResource(java.lang.String path) throws java.net.MalformedURLExceptionDeprecated.Description copied from interface:ServletContextReturns a URL to the resource that is mapped to a specified path. The path must begin with a "/" and is interpreted as relative to the current context root.This method allows the servlet container to make a resource available to servlets from any source. Resources can be located on a local or remote file system, in a database, or in a
.warfile.The servlet container must implement the URL handlers and
URLConnectionobjects that are necessary to access the resource.This method returns
nullif no resource is mapped to the pathname.Some containers may allow writing to the URL returned by this method using the methods of the URL class.
The resource content is returned directly, so be aware that requesting a
.jsppage returns the JSP source code. Use aRequestDispatcherinstead to include results of an execution.This method has a different purpose than
java.lang.Class.getResource, which looks up resources based on a class loader. This method does not use class loaders.- Specified by:
 getResourcein interfaceServletContext- Overrides:
 getResourcein classContextHandler.Context- Parameters:
 path- aStringspecifying the path to the resource- Returns:
 - the resource located at the named path, or 
nullif there is no resource at that path - Throws:
 java.net.MalformedURLException- if the pathname is not given in the correct form
 
- 
getContext
public ServletContext getContext(java.lang.String uripath)
Deprecated.Description copied from interface:ServletContextReturns aServletContextobject that corresponds to a specified URL on the server.This method allows servlets to gain access to the context for various parts of the server, and as needed obtain
RequestDispatcherobjects from the context. The given path must be begin with "/", is interpreted relative to the server's document root and is matched against the context roots of other web applications hosted on this container.In a security conscious environment, the servlet container may return
nullfor a given URL.- Specified by:
 getContextin interfaceServletContext- Overrides:
 getContextin classContextHandler.Context- Parameters:
 uripath- aStringspecifying the context path of another web application in the container.- Returns:
 - the 
ServletContextobject that corresponds to the named URL, or null if either none exists or the container wishes to restrict this access. - See Also:
 RequestDispatcher
 
 - 
 
 -