java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfigpublic class DefaultServlet
extends javax.servlet.http.HttpServlet
HttpHandler.handleRequest(io.undertow.server.HttpServerExchange) method,
otherwise the request is handled as a normal servlet request.
By default we only allow a restricted set of extensions.
todo: this thing needs a lot more work. In particular: - caching for blocking requests - correct mime type - range/last-modified and other headers to be handled properly - head requests - and probably heaps of other things| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
ALLOW_POST |
|
static java.lang.String |
ALLOWED_EXTENSIONS |
|
static java.lang.String |
DEFAULT_ALLOWED |
|
static java.lang.String |
DIRECTORY_LISTING |
|
static java.lang.String |
DISALLOWED_EXTENSIONS |
|
static java.lang.String |
RESOLVE_AGAINST_CONTEXT_ROOT |
| Constructor | Description |
|---|---|
DefaultServlet() |
| Modifier and Type | Method | Description |
|---|---|---|
protected void |
doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
|
protected void |
doOptions(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
|
protected void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
|
protected void |
doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
|
protected void |
doTrace(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
|
void |
init(javax.servlet.ServletConfig config) |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logpublic static final java.lang.String DIRECTORY_LISTING
public static final java.lang.String DEFAULT_ALLOWED
public static final java.lang.String ALLOWED_EXTENSIONS
public static final java.lang.String DISALLOWED_EXTENSIONS
public static final java.lang.String RESOLVE_AGAINST_CONTEXT_ROOT
public static final java.lang.String ALLOW_POST
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doPut(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doPut in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doDelete(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doDelete in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doOptions(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doOptions in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionprotected void doTrace(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
java.io.IOException
doTrace in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionjava.io.IOExceptionCopyright © 2018. All rights reserved.