Package org.apache.catalina.util
Class RequestUtil
- java.lang.Object
-
- org.apache.catalina.util.RequestUtil
-
public final class RequestUtil extends java.lang.Object
General purpose request parsing and encoding utility methods.- Author:
- Craig R. McClanahan, Tim Tye
-
-
Constructor Summary
Constructors Constructor Description RequestUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringBuffer
getRequestURL(HttpServletRequest request)
Build an appropriate return value forHttpServletRequest.getRequestURL()
based on the provided request object.static java.lang.String
stripPathParams(java.lang.String input, Request request)
Strip parameters for given path.
-
-
-
Method Detail
-
getRequestURL
public static java.lang.StringBuffer getRequestURL(HttpServletRequest request)
Build an appropriate return value forHttpServletRequest.getRequestURL()
based on the provided request object. Note that this will also work for instances ofHttpServletRequestWrapper
.- Parameters:
request
- The request object for which the URL should be built- Returns:
- The request URL for the given request object
-
stripPathParams
public static java.lang.String stripPathParams(java.lang.String input, Request request)
Strip parameters for given path.- Parameters:
input
- the input pathrequest
- the request to add the parameters to- Returns:
- the cleaned path
-
-