org.apache.wicket.protocol.http
Class RequestUtils

java.lang.Object
  extended by org.apache.wicket.protocol.http.RequestUtils

public final class RequestUtils
extends Object

Wicket Http specific utilities class.


Method Summary
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decodeParameters

public 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.

Parameters:
queryString - string to decode, uses '&' to separate parameters and '=' to separate key from value
params - parameters map to write the found key/ value pairs to

removeDoubleDots

public static String removeDoubleDots(String path)
Remove occurrences of ".." from the path

Parameters:
path -
Returns:
path string with double dots removed

toAbsolutePath

public static String toAbsolutePath(String requestPath,
                                    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 Charset getCharset(javax.servlet.http.HttpServletRequest request)
Parameters:
request - the http servlet request to extract the charset from
Returns:
the request's charset


Copyright © 2006-2012 Apache Software Foundation. All Rights Reserved.