public final class RequestUtils extends Object
Modifier and Type | Method and Description |
---|---|
static void |
decodeParameters(String queryString,
PageParameters params)
Decode the provided queryString as a series of key/ value pairs and set them in the provided
value map.
|
static Charset |
getCharset(javax.servlet.http.HttpServletRequest request) |
static String |
removeDoubleDots(String path)
Remove occurrences of ".." from the path
|
static String |
toAbsolutePath(String requestPath,
String relativePagePath)
Calculates absolute path to url relative to another absolute url.
|
public static void decodeParameters(String queryString, PageParameters params)
queryString
- string to decode, uses '&' to separate parameters and '=' to separate key from
valueparams
- parameters map to write the found key/ value pairs topublic static String removeDoubleDots(String path)
path
- public static String toAbsolutePath(String requestPath, String relativePagePath)
requestPath
- absolute path.relativePagePath
- path, relative to requestPathpublic static Charset getCharset(javax.servlet.http.HttpServletRequest request)
request
- the http servlet request to extract the charset fromnull
or has an unsupported
character encodingRequestCycleSettings.getResponseRequestEncoding()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.