This extension to the ContextHandler allows for simple construction of a context with ServletHandler and optionally session and security handlers, et.
new ServletContext("/context",Context.SESSIONS|Context.NO_SECURITY);
This class should have been called ServletContext, but this would have
cause confusion with jakarta..
| Modifier and Type | Class and Description |
|---|---|
| public static enum | |
| public static class | |
| public static class | |
| public static interface | |
| public static class | ServletContextHandler.
Bean that is added to the ServletContextHandler to start all of the ServletContainerInitializers by starting their corresponding ServletContainerInitializerHolders when this bean is itself started. |
| public class | |
| public static interface | ServletContextHandler.
Listener for all threads entering context scope, including async IO callbacks |
| public static interface | ServletContextHandler.
The interface used by |
| public static interface | ServletContextHandler.
The interface used by |
| public class | |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| public static final Environment | |
| private final List | |
| private String | |
| protected ServletContextHandler. | |
| private String | |
| private String | |
| private Class | |
| private final List | |
| private final Set | |
| private final Map | |
| protected JspConfigDescriptor | |
| private Map | |
| private Logger | |
| private int | |
| private int | |
| protected final DecoratedObjectFactory | |
| protected int | |
| private final List | |
| protected SecurityHandler | |
| private final ServletContextHandler. | |
| private final List | |
| private final List | |
| protected ServletHandler | |
| private final List | |
| private final List | |
| protected SessionHandler | |
| private boolean | |
| private boolean | |
| private String[] | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final int | |
| private static final Logger | |
| public static final String | |
| public static final String | |
| public static final int | |
| public static final int | |
| public static final int | |
| public static final Class | |
| public static final int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public | |
| public | |
| public | |
| public | ServletContextHandler(SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler)
|
| public | ServletContextHandler(String contextPath, SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler)
|
| public | ServletContextHandler(String contextPath, SessionHandler sessionHandler, SecurityHandler securityHandler, ServletHandler servletHandler, ErrorHandler errorHandler, int options)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the listener was addedthe event listener to add listener)Overrides org. Implements org. Add a context event listeners. |
| public void | addFilter(FilterHolder
the filter holder holder, String the path spec pathSpec, EnumSet<DispatcherType> the dispatcher types for this filter dispatches)Convenience method to add a filter |
| public FilterHolder | |
| public FilterHolder | Returns: the FilterHolder that was createdthe filter class name filterClass, String the path spec pathSpec, EnumSet<DispatcherType> the dispatcher types for this filter dispatches)Convenience method to add a filter |
| public FilterHolder | Returns: the FilterHolder that was createdthe filter instance filter, String the path spec pathSpec, EnumSet<DispatcherType> the dispatcher types for this filter dispatches)Convenience method to add a servlet. |
| public void | |
| protected void | addProgrammaticListener(EventListener
the programmatic listener to add listener)Apply any necessary restrictions on a programmatic added listener. |
| protected void | |
| public ServletHolder | Returns: the ServletHolder for the added servletthe servlet class name className, String the path spec to map servlet to pathSpec)Convenience method to add a servlet. |
| public ServletHolder | Returns: the ServletHolder for the added servletthe servlet class servlet, String the path spec to map servlet to pathSpec)Convenience method to add a servlet. |
| public void | addServlet(ServletHolder
the servlet holder servlet, String the path spec pathSpec)Convenience method to add a servlet. |
| public ServletHolder | Returns: the ServletHolder for the added servletthe servlet instance servlet, String the path spec pathSpec)Convenience method to add a servlet. |
| public ServletContainerInitializerHolder | Returns: the ServletContainerInitializerHolder that was createdthe ServletContainerInitializer to register. sci)Convenience method to programmatically add a |
| public ServletContainerInitializerHolder | Returns: the ServletContainerInitializerHolder that was createdthe ServletContainerInitializer to register. sci, Class<?>... the Set of application classes. classes)Convenience method to programmatically add a |
| public void | addServletContainerInitializer(ServletContainerInitializerHolder...
the ServletContainerInitializerHolders sciHolders)Convenience method to programmatically add a list of |
| public void | |
| public void | |
| public void | |
| public void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| private void | |
| protected void | doStart()
Overrides org. Starts the managed lifecycle beans in the order they were added. |
| protected void | doStop()
Overrides org. Stops the managed lifecycle beans in the reverse order they were added. |
| public void | dump(Appendable
The appendable to dump to out, String The indent to apply after any new lines. indent)Overrides org. Implements org. Dump this object (and children) into an Appendable using the provided indent after any new lines. |
| protected ServletRegistration. | Returns: the ServletRegistration.Dynamicnew holder created through the api. holder)notification that a ServletRegistration has been created so we can track the annotations |
| public ServletContextHandler. | |
| public String | |
| public static ServletContext | |
| public static ServletContextHandler | |
| public String | |
| public String | |
| public Class | Returns: the defaultSecurityHandlerClassGet the defaultSecurityHandlerClass. |
| public String | |
| public Enumeration | |
| public Map | |
| public Invocable. | |
| public String | |
| public String | Returns: aString representing the character encoding for the locale or null if none found.a locale)Locale valueGet the character encoding for a locale. |
| public Map | Returns: a map of all the locale encodings: key is name of the locale and value is the char encodingGet all of the locale encodings |
| public Logger | |
| private String | |
| public int | |
| public int | |
| public DecoratedObjectFactory | Returns: The DecoratedObjectFactoryThe DecoratedObjectFactory for use by IoC containers (weld / spring / etc) |
| public String | Returns: Returns the encoded contextPath, or empty string for root contextGet the context path in a form suitable to be returned from |
| public Resource | Returns: the resource, or null if not available.the path within the base resource to attempt to get pathInContext)Attempt to get a Resource from the Context. |
| public Set | |
| public SecurityHandler | |
| private static Object | |
| public static ServletContext | |
| public ServletContext | |
| public static ServletContextHandler | |
| public static ServletContextHandler | |
| public ServletHandler | |
| public SessionHandler | |
| public String[] | getWelcomeFiles()
Returns: The names of the files which the server should consider to be welcome files in this context. |
| protected boolean | handleByContextHandler(String pathInContext, ContextRequest request, Response response, Callback callback)
Overrides org.
|
| public void | insertHandler(Handler.
the handlerHandler to insertOverrides default org. Insert a HandlerWrapper before the first Session, Security or ServletHandler but after any other HandlerWrappers. |
| public boolean | |
| public boolean | |
| public boolean | |
| public Class | |
| protected ContextHandler. | |
| public Resource | Returns: the Resource for that urlthe url to convert to a Resource url)Convert URL to Resource wrapper for |
| public Resource | Returns: the Resource for that URIthe URI to convert to a Resource uri)Convert URL to Resource wrapper for |
| public Resource | Returns: The Resource for the URL/pathThe URL or path to convert urlOrPath)Convert a URL or path to a Resource. |
| protected SecurityHandler | |
| public ServletContextHandler. | |
| protected ServletContextRequest | newServletContextRequest(ServletChannel servletChannel, Request request, Response response, String decodedPathInContext, MatchedResource<ServletHandler.
|
| protected ServletHandler | |
| protected SessionHandler | |
| protected void | notifyEnterScope(Request
A request that is applicable to the scope, or null request)Overrides org.
|
| protected void | notifyExitScope(Request
A request that is applicable to the scope, or null request)Overrides org.
|
| private void | |
| public boolean | removeEventListener(EventListener
the listener to remove listener)Overrides org. Implements org. Remove an event listener. |
| private void | |
| protected void | |
| protected void | |
| public void | setContextPath(String
The _contextPath to set. contextPath)Overrides org.
|
| public void | |
| public void | |
| public void | setDefaultSecurityHandlerClass(Class<? extends SecurityHandler>
the defaultSecurityHandlerClass to set defaultSecurityHandlerClass)Set the defaultSecurityHandlerClass. |
| public void | setHandler(Handler
The handler)Handler to set as a childOverrides org. Implements org.
|
| public String | |
| public void | |
| public void | setMaxFormContentSize(int
the maximum size of the form content (in bytes) maxSize)Set the maximum size of a form post, to protect against DOS attacks from large forms. |
| public void | setMaxFormKeys(int
the maximum number of form keys max)Set the maximum number of form Keys to protect against DOS attack from crafted hash keys. |
| public void | |
| public void | |
| public Set | Returns: the set of exact URL mappings currently associated with the registration that are also present in the web.xml security constraints and thus will be unaffected by this call.ServletRegistration.Dynamic instance that setServletSecurity was called on registration,new security info servletSecurityElement)Delegate for ServletRegistration.Dynamic.setServletSecurity method |
| public void | |
| public void | setTempDirectory(File
A directory. If it does not exist, it must be able to be created during start. tempDirectory)Overrides org. Set the temporary directory returned by |
| public void | |
| public void | |
| protected void | |
| protected void | |
| private ContextRequest | |
| protected ContextRequest | wrapRequest(Request request, Response response)
Overrides org.
|
| protected ContextResponse | wrapResponse(ContextRequest request, Response response)
Overrides org.
|