This handler maps requests to servlets that implement the jakarta.servlet.http.HttpServlet API.
This handler does not implement the full J2EE features and is intended to
be used directly when a full web application is not required. If a Web application is required,
then this handler should be used as part of a org.eclipse.jetty.webapp.WebAppContext.
Unless run as part of a ServletContextHandler or derivative, the initialize()
method must be called manually after start().
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class | |
| public static class | |
| public static class | ServletHandler.
A mapping of a servlet by pathSpec or by name |
| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| protected final ConcurrentMap | |
| private boolean | |
| private final List | |
| private boolean | |
| private boolean | |
| private final List | |
| private final Map | |
| private MultiMap | |
| private List | |
| private final List | |
| private IdentityService | |
| private boolean | |
| private final List | |
| private final AutoLock | |
| private int | |
| private int | |
| private int | |
| private ServletContext | |
| private ServletContextHandler | |
| private final List | |
| private final Map | |
| private PathMappings | |
| private final List | |
| private boolean | |
| private List | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addFilter(FilterHolder
the filter holder filter, FilterMapping the filter mapping filterMapping)Convenience method to add a filter and mapping |
| public void | addFilter(FilterHolder
the filter holder filter)Convenience method to add a preconstructed FilterHolder |
| public void | addFilterMapping(FilterMapping
the filter mapping mapping)Convenience method to add a preconstructed FilterMapping |
| public FilterHolder | Returns: The filter holder.class of filter to create filter, String filter mappings for filter pathSpec, EnumSet<DispatcherType> dispatches)Convenience method to add a filter. |
| public FilterHolder | Returns: The filter holder.of filter className, String filter mappings for filter pathSpec, EnumSet<DispatcherType> dispatches)Convenience method to add a filter. |
| public void | addFilterWithMapping(FilterHolder
filter holder to add holder, String filter mappings for filter pathSpec, EnumSet<DispatcherType> dispatches)Convenience method to add a filter. |
| public FilterHolder | Returns: The filter holder.class of filter to create filter, String filter mappings for filter pathSpec, int dispatches)Convenience method to add a filter. |
| public FilterHolder | Returns: The filter holder.of filter className, String filter mappings for filter pathSpec, int dispatches)Convenience method to add a filter. |
| public void | addFilterWithMapping(FilterHolder
filter holder to add holder, String filter mappings for filter pathSpec, int dispatches)Convenience method to add a filter. |
| public void | |
| public void | addServlet(ServletHolder
the servlet holder holder)Convenience method to add a pre-constructed ServletHolder. |
| public void | addServletMapping(ServletMapping
the servlet mapping mapping)Convenience method to add a pre-constructed ServletMapping. |
| public ServletHolder | Returns: The servlet holder.the class name className, String the path spec pathSpec)Convenience method to add a servlet. |
| public ServletHolder | Returns: The servlet holder.the servlet class servlet, String the path spec pathSpec)Convenience method to add a servlet. |
| public void | addServletWithMapping(ServletHolder
servlet holder to add servlet, String servlet mappings for the servletHolder pathSpec)Convenience method to add a servlet. |
| protected PathSpec | |
| protected boolean | |
| protected boolean | |
| pack-priv void | |
| pack-priv void | |
| pack-priv 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. |
| public FilterHolder | |
| protected FilterChain | |
| public FilterMapping[] | |
| public FilterHolder[] | |
| protected IdentityService | |
| public ListenerHolder[] | |
| public ServletHandler. | Returns: MappedResource to the ServletHolder. Named servlets have a null PathSpecPath within _context or servlet name target)ServletHolder matching path. |
| public MatchedResource | Returns: MatchedResource, pointing to theMappedResource for the ServletHolder, and also the pathspec specific name/info sections for the match.
Named servlets have a null PathSpec and MatchedResource.Path within _context or servlet name target)ServletHolder matching target path. |
| public int | |
| public ServletHolder | |
| public ServletContext | |
| public ServletContextHandler | |
| public ServletMapping | Returns: the servlet mapping for the path spec (or null if not found)the path spec pathSpec)Get the ServletMapping matching the path |
| public ServletMapping[] | |
| public ServletHolder[] | |
| public List | |
| public boolean | handle(Request
the HTTP request to handle request, Response the HTTP response to handle response, Callback the callback to complete when the handling is complete callback)Overrides org. Implements org. Invoked to handle the passed HTTP request and response. |
| public void | |
| protected void | |
| protected void | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isDumpable(Object o)
Overrides default org.
|
| public boolean | isEnsureDefaultServlet()
Returns: true if ServletHandler always has a default servlet, using |
| public boolean | |
| public boolean | |
| public boolean | |
| pack-priv AutoLock | |
| protected FilterChain | Returns: A FilterChain that invokes the filter with the chainThe filter to invoke filterHolder, FilterChain The chain to pass to the filter chain)Create a FilterChain that calls the passed filter with the passed chain |
| public FilterHolder | |
| public ListenerHolder | |
| public ServletHolder | |
| protected void | |
| public void | prependFilter(FilterHolder
the filter holder filter)Convenience method to add a preconstructed FilterHolder |
| public void | prependFilterMapping(FilterMapping
the filter mapping mapping)Convenience method to add a preconstructed FilterMapping |
| public void | |
| public void | |
| public void | setAllowDuplicateMappings(boolean
the allowDuplicateMappings to set allowDuplicateMappings)Set the allowDuplicateMappings to set. |
| public void | setDecodeAmbiguousURIs(boolean
True if ambiguous URIs are decoded by ServletApiRequest#getServletPath()
and ServletApiRequest#getPathInfo().
|
| public void | setEnsureDefaultServlet(boolean
true if ServletHandler always has a default servlet, using ensureDefaultServlet)Default404Servlet if no other
default servlet is configured.
|
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setMaxFilterChainsCacheSize(int
the maximum number of entries in a filter chain cache. maxFilterChainsCacheSize)Set the maximum filter chain cache size. |
| public void | |
| public void | |
| public Set | setServletSecurity(ServletRegistration.
|
| public void | |
| protected void | start(LifeCycle
the lifecycle to start l)Overrides org. Starts the given lifecycle. |
| protected void | stop(LifeCycle
the lifecycle to stop l)Overrides org. Stops the given lifecycle. |
| private <T> void | |
| protected void | |
| protected void |