org.apache.struts.util
Class ResponseUtils
java.lang.Object
org.apache.struts.util.ResponseUtils
public class ResponseUtils
extends java.lang.Object
General purpose utility methods related to generating a servlet response
in the Struts controller framework.
Version:
- Craig R. McClanahan
static String | filter(String value) - Filter the specified string for characters that are senstive 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.
|
messages
protected static MessageResources messages
The message resources for this package.
filter
public static String filter(String value)
Filter the specified string for characters that are senstive to
HTML interpreters, returning the string with these characters replaced
by the corresponding character entities.
value
- The string to be filtered and returned
write
public static void write(PageContext pageContext,
String text)
throws JspException
Write the specified text as the response to the writer associated with
this page. WARNING - If you are writing body content
from the 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 written
writePrevious
public static void writePrevious(PageContext pageContext,
String text)
throws JspException
Write the specified text as the response to the writer associated with
the body content for the tag within which we are currently nested.
pageContext
- The PageContext object for this pagetext
- The text to be written
Copyright B) 2000-2005 - Apache Software Foundation