public class ServletUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
endTransaction() |
static java.io.InputStream |
extractPartInputStream(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static java.lang.String |
getDecodedUri(javax.servlet.http.HttpServletRequest request) |
static java.lang.String |
getUserAgent() |
static boolean |
isXhrRequest(javax.servlet.http.HttpServletRequest request) |
static void |
logRequest(java.lang.String method,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
static java.lang.String |
sanatizeContextPath(java.lang.String context_path) |
static void |
sendErrorResponse(javax.servlet.http.HttpServletResponse response,
java.lang.Exception exception,
java.lang.String uri) |
static void |
sendResponseError(javax.servlet.http.HttpServletResponse response,
int sc,
java.lang.String msg) |
static void |
setCommonResponseHttpHeaders(javax.servlet.http.HttpServletResponse response,
boolean xhrRequest) |
static void |
setResponseStatus(javax.servlet.http.HttpServletResponse response,
int sc) |
static void |
startRequestLifecycle()
Called from JettyHTTPD.
|
static void |
startTransaction(java.lang.String userAgent) |
public static void startRequestLifecycle()
public static void startTransaction(java.lang.String userAgent)
public static void endTransaction()
public static java.lang.String getUserAgent()
public static void setResponseStatus(javax.servlet.http.HttpServletResponse response, int sc)
public static void sendResponseError(javax.servlet.http.HttpServletResponse response, int sc, java.lang.String msg) throws java.io.IOException
java.io.IOException
public static java.io.InputStream extractPartInputStream(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException
java.io.IOException
public static void sendErrorResponse(javax.servlet.http.HttpServletResponse response, java.lang.Exception exception, java.lang.String uri)
public static java.lang.String getDecodedUri(javax.servlet.http.HttpServletRequest request)
public static boolean isXhrRequest(javax.servlet.http.HttpServletRequest request)
public static void setCommonResponseHttpHeaders(javax.servlet.http.HttpServletResponse response, boolean xhrRequest)
public static java.lang.String sanatizeContextPath(java.lang.String context_path)
public static void logRequest(java.lang.String method, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)