org.apache.struts.util
public class ResponseUtils extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.reflect.Method |
encode
Java 1.4 encode method to use instead of deprecated 1.3 version.
|
private static org.apache.commons.logging.Log |
log
Commons logging instance.
|
protected static MessageResources |
messages
The message resources for this package.
|
Constructor and Description |
---|
ResponseUtils() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
encodeURL(java.lang.String url)
URLencodes a string assuming the character encoding is UTF-8.
|
static java.lang.String |
encodeURL(java.lang.String url,
java.lang.String enc)
Use the new URLEncoder.encode() method from Java 1.4 if available, else
use the old deprecated version.
|
static java.lang.String |
filter(java.lang.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(javax.servlet.jsp.PageContext pageContext,
java.lang.String text)
Deprecated.
use TagUtils.write() method instead.
This method will be removed after Struts 1.2.
|
static void |
writePrevious(javax.servlet.jsp.PageContext pageContext,
java.lang.String text)
Deprecated.
use TagUtils.writePrevious() method instead.
This method will be removed after Struts 1.2.
|
protected static MessageResources messages
private static java.lang.reflect.Method encode
private static final org.apache.commons.logging.Log log
public static java.lang.String filter(java.lang.String value)
value
- The string to be filtered and returnedpublic static java.lang.String encodeURL(java.lang.String url)
URLencodes a string assuming the character encoding is UTF-8.
url
- public static java.lang.String encodeURL(java.lang.String url, java.lang.String enc)
enc
- The character encoding the urlencode is performed on.public static void write(javax.servlet.jsp.PageContext pageContext, java.lang.String text) throws javax.servlet.jsp.JspException
doAfterBody()
method of a custom tag class that
implements BodyTag
, you should be calling
writePrevious()
instead.pageContext
- The PageContext object for this pagetext
- The text to be writtenjavax.servlet.jsp.JspException
- if an input/output error occurs (already saved)public static void writePrevious(javax.servlet.jsp.PageContext pageContext, java.lang.String text) throws javax.servlet.jsp.JspException
pageContext
- The PageContext object for this pagetext
- The text to be writtenjavax.servlet.jsp.JspException
- if an input/output error occurs (already saved)Copyright ? 2000-2014 - The Apache Software Foundation