java.io.Serializable
, javax.servlet.Servlet
, javax.servlet.ServletConfig
public 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 thingsModifier 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, log
public 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.Servlet
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
protected 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.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected 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.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected 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.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected 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.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected 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.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected 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.HttpServlet
javax.servlet.ServletException
java.io.IOException
Copyright © 2018. All rights reserved.