Package org.apache.struts.util
Class ResponseUtils
java.lang.Object
org.apache.struts.util.ResponseUtils
General purpose utility methods related to generating a servlet response in
the Struts controller framework.
-
Field Summary
Modifier and TypeFieldDescriptionprotected static MessageResources
The message resources for this package. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
URLencodes a string assuming the character encoding is UTF-8.static String
Use the URLEncoder.encode() with the given encoding.static String
Filter the specified string for characters that are sensitive to HTML interpreters, returning the string with these characters replaced by the corresponding character entities.
-
Field Details
-
messages
The message resources for this package.
-
-
Constructor Details
-
ResponseUtils
protected ResponseUtils()Class is not instanceable.
-
-
Method Details
-
filter
Filter the specified string for characters that are sensitive to HTML interpreters, returning the string with these characters replaced by the corresponding character entities.- Parameters:
value
- The string to be filtered and returned- Returns:
- String The filtered string
-
encodeURL
URLencodes a string assuming the character encoding is UTF-8.- Parameters:
url
- The url to encode- Returns:
- String The encoded url in UTF-8
-
encodeURL
Use the URLEncoder.encode() with the given encoding. When the encoding charset didn't found, then it will be tried with the default-charset.- Parameters:
url
- The url to encodeenc
- The character encoding the urlencode is performed on.- Returns:
- String The encoded url.
-