org.apache.struts.util
public class ResponseUtils extends Object
Version: $Rev: 164747 $ $Date: 2005-04-26 06:47:48 +0100 (Tue, 26 Apr 2005) $
Field Summary | |
---|---|
static Method | encode
Java 1.4 encode method to use instead of deprecated 1.3 version. |
static Log | log
Commons logging instance. |
protected static MessageResources | messages
The message resources for this package. |
Method Summary | |
---|---|
static String | encodeURL(String url) URLencodes a string assuming the character encoding is UTF-8. |
static String | encodeURL(String url, String enc)
Use the new URLEncoder.encode() method from Java 1.4 if available, else
use the old deprecated version. |
static String | filter(String value)
Filter the specified string for characters that are sensitive to
HTML interpreters, returning the string with these characters replaced
by the corresponding character entities.
|
static void | write(PageContext pageContext, String text)
Write the specified text as the response to the writer associated with
this page. |
static void | writePrevious(PageContext pageContext, String text)
Write the specified text as the response to the writer associated with
the body content for the tag within which we are currently nested.
|
URLencodes a string assuming the character encoding is UTF-8.
Parameters: url
Returns: String The encoded url in UTF-8
Parameters: enc The character encoding the urlencode is performed on.
Returns: String The encoded url.
Parameters: value The string to be filtered and returned
Deprecated: use TagUtils.write() method instead. This method will be removed after Struts 1.2.
Write the specified text as the response to the writer associated with this page. WARNING - If you are writing body content from thedoAfterBody()
method of a custom tag class that
implements BodyTag
, you should be calling
writePrevious()
instead.
Parameters: pageContext The PageContext object for this page text The text to be written
Throws: JspException if an input/output error occurs (already saved)
Deprecated: use TagUtils.writePrevious() method instead. This method will be removed after Struts 1.2.
Write the specified text as the response to the writer associated with the body content for the tag within which we are currently nested.Parameters: pageContext The PageContext object for this page text The text to be written
Throws: JspException if an input/output error occurs (already saved)