Package org.apache.wicket.protocol.http
Class RequestUtils
- java.lang.Object
-
- org.apache.wicket.protocol.http.RequestUtils
-
public final class RequestUtils extends java.lang.ObjectWicket Http specific utilities class.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddecodeParameters(java.lang.String queryString, org.apache.wicket.request.mapper.parameter.PageParameters params)Decode the provided queryString as a series of key/ value pairs and set them in the provided value map.static java.nio.charset.CharsetgetCharset(javax.servlet.http.HttpServletRequest request)static java.lang.StringremoveDoubleDots(java.lang.String path)Remove occurrences of ".." from the pathstatic java.lang.StringtoAbsolutePath(java.lang.String requestPath, java.lang.String relativePagePath)Calculates absolute path to url relative to another absolute url.
-
-
-
Method Detail
-
decodeParameters
public static void decodeParameters(java.lang.String queryString, org.apache.wicket.request.mapper.parameter.PageParameters params)Decode the provided queryString as a series of key/ value pairs and set them in the provided value map.- Parameters:
queryString- string to decode, uses '&' to separate parameters and '=' to separate key from valueparams- parameters map to write the found key/ value pairs to
-
removeDoubleDots
public static java.lang.String removeDoubleDots(java.lang.String path)
Remove occurrences of ".." from the path- Parameters:
path-- Returns:
- path string with double dots removed
-
toAbsolutePath
public static java.lang.String toAbsolutePath(java.lang.String requestPath, java.lang.String relativePagePath)Calculates absolute path to url relative to another absolute url.- Parameters:
requestPath- absolute path.relativePagePath- path, relative to requestPath- Returns:
- absolute path for given url
-
getCharset
public static java.nio.charset.Charset getCharset(javax.servlet.http.HttpServletRequest request)
- Parameters:
request- the http servlet request to extract the charset from- Returns:
- the request's charset or a default it request is
nullor has an unsupported character encoding - See Also:
RequestCycleSettings.getResponseRequestEncoding()
-
-