org.apache.struts2.views.util
Class UrlHelper
java.lang.Object
org.apache.struts2.views.util.UrlHelper
public class UrlHelper
- extends Object
UrlHelper
Method Summary |
static void |
buildParametersString(Map params,
StringBuffer link)
|
static void |
buildParametersString(Map params,
StringBuffer link,
String paramSeparator)
|
private static String |
buildParameterSubstring(String name,
String value)
|
static String |
buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params)
|
static String |
buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params,
String scheme,
boolean includeContext,
boolean encodeResult)
|
static String |
buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params,
String scheme,
boolean includeContext,
boolean encodeResult,
boolean forceAddSchemeHostAndPort)
|
static String |
buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params,
String scheme,
boolean includeContext,
boolean encodeResult,
boolean forceAddSchemeHostAndPort,
boolean escapeAmp)
|
private static String |
getEncodingFromConfiguration()
|
static Map |
parseQueryString(String queryString)
|
static String |
translateAndDecode(String input)
|
static String |
translateAndEncode(String input)
Translates any script expressions using TextParseUtil.translateVariables(java.lang.String, com.opensymphony.xwork2.util.ValueStack) and
encodes the URL using URLEncoder.encode(java.lang.String) with the encoding specified in the configuration. |
private static String |
translateVariable(String input)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
private static final Logger LOG
DEFAULT_HTTP_PORT
private static final int DEFAULT_HTTP_PORT
- Default HTTP port (80).
- See Also:
- Constant Field Values
DEFAULT_HTTPS_PORT
private static final int DEFAULT_HTTPS_PORT
- Default HTTPS port (443).
- See Also:
- Constant Field Values
AMP
private static final String AMP
- See Also:
- Constant Field Values
UrlHelper
public UrlHelper()
buildUrl
public static String buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params)
buildUrl
public static String buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params,
String scheme,
boolean includeContext,
boolean encodeResult)
buildUrl
public static String buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params,
String scheme,
boolean includeContext,
boolean encodeResult,
boolean forceAddSchemeHostAndPort)
buildUrl
public static String buildUrl(String action,
HttpServletRequest request,
HttpServletResponse response,
Map params,
String scheme,
boolean includeContext,
boolean encodeResult,
boolean forceAddSchemeHostAndPort,
boolean escapeAmp)
buildParametersString
public static void buildParametersString(Map params,
StringBuffer link)
buildParametersString
public static void buildParametersString(Map params,
StringBuffer link,
String paramSeparator)
buildParameterSubstring
private static String buildParameterSubstring(String name,
String value)
translateAndEncode
public static String translateAndEncode(String input)
- Translates any script expressions using
TextParseUtil.translateVariables(java.lang.String, com.opensymphony.xwork2.util.ValueStack)
and
encodes the URL using URLEncoder.encode(java.lang.String)
with the encoding specified in the configuration.
- Parameters:
input
-
- Returns:
- the translated and encoded string
translateAndDecode
public static String translateAndDecode(String input)
translateVariable
private static String translateVariable(String input)
getEncodingFromConfiguration
private static String getEncodingFromConfiguration()
parseQueryString
public static Map parseQueryString(String queryString)
Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.