The default Servlet, normally mapped to /, that handles static resources.
The following init parameters are supported:
true to accept range requests, defaults to true.
Cache-Control header.
If omitted, no Cache-Control header is generated in responses.
By default is omitted.
1000 ms.
Use -1 to cache forever or 0 to not cache.
true to serve directory listing if no welcome file is found.
Otherwise responds with 403 Forbidden.
Defaults to true.
Accept-Encoding entries.
Use -1 for the default value (100), 0 for no cache.
true to generate ETags in responses.
Defaults to false.
-1 for the default value (2048) or 0 for no cache.
-1 for the default value (128 MiB) or 0 for no cache.
-1 for the default value (256 MiB) or 0 for no cache.
.svgz.
true, the default set of pre-compressed formats will be used.
Otherwise can be set to a comma-separated list of encoding=extension pairs,
such as: br=.br,gzip=.gz,bzip2=.bz, where encoding is used as the
value for the Content-Encoding header.
true to redirect welcome files, otherwise they are forwarded.
Defaults to false.
Server's default stylesheet, jetty-dir.css.
The path of a custom stylesheet to style the directory listing HTML.
true to use file mapping to serve static resources.
Defaults to false.
false to only serve welcome resources from the file system.
Use true to dispatch welcome resources to a matching Servlet
(for example mapped to *.welcome), when the welcome resources
does not exist on file system.
Use exact to dispatch welcome resource to a Servlet whose mapping
is exactly the same as the welcome resource (for example /index.welcome),
when the welcome resources does not exist on file system.
Defaults to false.
| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| private static class | |
| private class | |
| private static class | DefaultServlet.UnknownLengthHttpContent
Wrap an existing HttpContent with one that takes has an unknown/unspecified length. |
| private static enum | DefaultServlet.WelcomeServletMode
The different modes a welcome resource may be served by a Servlet. |
| Modifier and Type | Field and Description |
|---|---|
| private ServletContextHandler | |
| private DefaultServlet. | |
| private DefaultServlet. | |
| public static final String | |
| private static final Logger |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | doGet(HttpServletRequest
an httpServletRequest, HttpServletResponse HttpServletRequest object that contains the request the client has made of the servletan httpServletResponse)HttpServletResponse object that contains the response the servlet sends to the clientOverrides jakarta. service method) to allow a servlet to handle a GET request.
|
| protected void | doHead(HttpServletRequest
the request object that is passed to the servlet req, HttpServletResponse the response object that the servlet uses to return the headers to the clien resp)Overrides jakarta.
Receives an HTTP HEAD request from the protected |
| protected void | doOptions(HttpServletRequest
the req, HttpServletResponse HttpServletRequest object that contains the request the client made of the servletthe resp)HttpServletResponse object that contains the response the servlet returns to the clientOverrides jakarta. service method) to allow a servlet to handle a OPTIONS request.
|
| protected void | doTrace(HttpServletRequest
the req, HttpServletResponse HttpServletRequest object that contains the request the client made of the servletthe resp)HttpServletResponse object that contains the response the servlet returns to the clientOverrides jakarta. service method) to allow a servlet to handle a TRACE request.
|
| private static ByteBufferPool | |
| protected String | |
| pack-priv static String | getIncludedPathInContext(HttpServletRequest request, String includedServletPath, boolean isPathInfoOnly)
|
| private Boolean | |
| private boolean | |
| private int | |
| private String | |
| public String | Returns: aString containing the value of the initialization parametera name)String specifying the name of the initialization parameterOverrides jakarta. Implements jakarta.
Returns a |
| private Resource | |
| public ResourceService | |
| public void | init()
Overrides jakarta. super.init(config).
|
| protected ServletContextHandler | |
| protected boolean | |
| private static boolean | |
| private List |