public class RequestUtil extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
acceptsGzipEncoding(javax.servlet.http.HttpServletRequest request) |
static String |
getEncodedPathInfo(javax.servlet.http.HttpServletRequest req) |
static Throwable |
getErrorTraceAttribute(javax.servlet.http.HttpServletRequest req) |
static String |
getRestPathWithoutIds(javax.servlet.http.HttpServletRequest req)
Trims leading '/' and 'a/'.
|
static void |
setErrorTraceAttribute(javax.servlet.http.HttpServletRequest req,
Throwable t) |
public static void setErrorTraceAttribute(javax.servlet.http.HttpServletRequest req, Throwable t)
public static Throwable getErrorTraceAttribute(javax.servlet.http.HttpServletRequest req)
public static String getEncodedPathInfo(javax.servlet.http.HttpServletRequest req)
HttpServletRequest.getPathInfo()
, but without decoding
URL-encoded characters.public static String getRestPathWithoutIds(javax.servlet.http.HttpServletRequest req)
The returned string is a good fit for cases where one wants the full context of the request without any identifiable data. For example: Logging or quota checks.
Examples:
public static boolean acceptsGzipEncoding(javax.servlet.http.HttpServletRequest request)