public class DefaultServlet
extends jakarta.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 and Description |
|---|---|
static String |
ALLOW_POST |
static String |
ALLOWED_EXTENSIONS |
static String |
DEFAULT_ALLOWED |
static String |
DIRECTORY_LISTING |
static String |
DISALLOWED_EXTENSIONS |
static String |
RESOLVE_AGAINST_CONTEXT_ROOT |
| Constructor and Description |
|---|
DefaultServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doDelete(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp) |
protected void |
doGet(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp) |
protected void |
doOptions(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp) |
protected void |
doPost(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp) |
protected void |
doPut(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp) |
protected void |
doTrace(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp) |
void |
init(jakarta.servlet.ServletConfig config) |
doHead, getLastModified, service, servicepublic static final String DIRECTORY_LISTING
public static final String DEFAULT_ALLOWED
public static final String ALLOWED_EXTENSIONS
public static final String DISALLOWED_EXTENSIONS
public static final String RESOLVE_AGAINST_CONTEXT_ROOT
public static final String ALLOW_POST
public void init(jakarta.servlet.ServletConfig config)
throws jakarta.servlet.ServletException
init in interface jakarta.servlet.Servletinit in class jakarta.servlet.GenericServletjakarta.servlet.ServletExceptionprotected void doGet(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp)
throws jakarta.servlet.ServletException,
IOException
doGet in class jakarta.servlet.http.HttpServletjakarta.servlet.ServletExceptionIOExceptionprotected void doPost(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp)
throws jakarta.servlet.ServletException,
IOException
doPost in class jakarta.servlet.http.HttpServletjakarta.servlet.ServletExceptionIOExceptionprotected void doPut(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp)
throws jakarta.servlet.ServletException,
IOException
doPut in class jakarta.servlet.http.HttpServletjakarta.servlet.ServletExceptionIOExceptionprotected void doDelete(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp)
throws jakarta.servlet.ServletException,
IOException
doDelete in class jakarta.servlet.http.HttpServletjakarta.servlet.ServletExceptionIOExceptionprotected void doOptions(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp)
throws jakarta.servlet.ServletException,
IOException
doOptions in class jakarta.servlet.http.HttpServletjakarta.servlet.ServletExceptionIOExceptionprotected void doTrace(jakarta.servlet.http.HttpServletRequest req,
jakarta.servlet.http.HttpServletResponse resp)
throws jakarta.servlet.ServletException,
IOException
doTrace in class jakarta.servlet.http.HttpServletjakarta.servlet.ServletExceptionIOExceptionCopyright © 2022 JBoss by Red Hat. All rights reserved.