com.opensymphony.webwork.views.util
Class UrlHelper

java.lang.Object
  extended by com.opensymphony.webwork.views.util.UrlHelper

public class UrlHelper
extends Object

UrlHelper

Author:
Jason Carreira Created Apr 19, 2003 9:32:19 PM, tm_jee

Constructor Summary
UrlHelper()
           
 
Method Summary
static void buildParametersString(Map params, StringBuffer link)
           
static void buildParametersString(Map params, StringBuffer link, String paramSeparator)
           
static String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params)
          Build url based on arguments supplied, will include context path but does not encode result (append jsessionid).
static String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params, String scheme, boolean includeContext, boolean encodeResult)
          Build url based on arguments supplied, will not include schema, host and port in the created url.
static String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort)
          Build url based on arguments supplied, will escape ampersand.
static String buildUrl(String action, HttpServletRequest request, HttpServletResponse response, Map params, String scheme, boolean includeContext, boolean encodeResult, boolean forceAddSchemeHostAndPort, boolean escapeAmp)
          Build url based on arguments supplied.
static String decode(String input)
          Decodes the URL using URLDecoder.decode(String, String) with the encoding specified in the configuration.
static String encode(String input)
          Encodes the URL using URLEncoder.encode(java.lang.String) with the encoding specified in the configuration.
static Map parseQueryString(String queryString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UrlHelper

public UrlHelper()
Method Detail

buildUrl

public static String buildUrl(String action,
                              HttpServletRequest request,
                              HttpServletResponse response,
                              Map params)
Build url based on arguments supplied, will include context path but does not encode result (append jsessionid).

Parameters:
action -
request -
response -
params -
Returns:
the build url

buildUrl

public static String buildUrl(String action,
                              HttpServletRequest request,
                              HttpServletResponse response,
                              Map params,
                              String scheme,
                              boolean includeContext,
                              boolean encodeResult)
Build url based on arguments supplied, will not include schema, host and port in the created url.

Parameters:
action -
request -
response -
params -
scheme -
includeContext -
encodeResult -
Returns:
the build url

buildUrl

public static String buildUrl(String action,
                              HttpServletRequest request,
                              HttpServletResponse response,
                              Map params,
                              String scheme,
                              boolean includeContext,
                              boolean encodeResult,
                              boolean forceAddSchemeHostAndPort)
Build url based on arguments supplied, will escape ampersand.

Parameters:
action -
request -
response -
params -
scheme -
includeContext -
encodeResult -
forceAddSchemeHostAndPort -
Returns:
the build url

buildUrl

public static String buildUrl(String action,
                              HttpServletRequest request,
                              HttpServletResponse response,
                              Map params,
                              String scheme,
                              boolean includeContext,
                              boolean encodeResult,
                              boolean forceAddSchemeHostAndPort,
                              boolean escapeAmp)
Build url based on arguments supplied.

Parameters:
action -
request -
response -
params -
scheme -
includeContext -
encodeResult -
forceAddSchemeHostAndPort -
escapeAmp -
Returns:
the build url

buildParametersString

public static void buildParametersString(Map params,
                                         StringBuffer link)

buildParametersString

public static void buildParametersString(Map params,
                                         StringBuffer link,
                                         String paramSeparator)

encode

public static String encode(String input)
Encodes the URL using URLEncoder.encode(java.lang.String) with the encoding specified in the configuration.

Parameters:
input - the input to encode
Returns:
the encoded string

decode

public static String decode(String input)
Decodes the URL using URLDecoder.decode(String, String) with the encoding specified in the configuration.

Parameters:
input - the input to decode
Returns:
the encoded string

parseQueryString

public static Map parseQueryString(String queryString)


Copyright © 2013 OpenSymphony. All Rights Reserved.