Class DefaultServlet

java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
org.eclipse.jetty.ee10.servlet.ResourceServlet
org.eclipse.jetty.ee10.servlet.DefaultServlet
All Implemented Interfaces:
jakarta.servlet.Servlet, jakarta.servlet.ServletConfig, Serializable

public class DefaultServlet extends ResourceServlet

The DefaultServlet, is a specialization of the ResourceServlet to be mapped to / as the "default" servlet for a context.

In addition to the servlet init parameters that can be used to configure any ResourceServlet, the DefaultServlet also looks at ServletContext.getInitParameter(String) for any parameter starting with CONTEXT_INIT, which is then stripped and the resulting name interpreted as a ResourceServlet init parameter.

To serve static content other than as the DefaultServlet mapped to "/", please use the ResourceServlet directly. The DefaultServlet will warn if it is used other than as the default servlet. In future, this may become a fatal error.

See Also: