Apache Struts API Documentation: Class ResponseUtils

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  $Revision: 1.1 $ $Date: 2001-09-17 21:13:30 +0100 (Mon, 17 Sep 2001) $
Author:
  Craig R. McClanahan

Field Summary
`protected static MessageResources` | `messages` The message resources for this package.

Constructor Summary
`ResponseUtils()`

Method Summary
`static java.lang.String` | `filter(java.lang.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(javax.servlet.jsp.PageContext pageContext, java.lang.String text)` Write the specified text as the response to the writer associated with this page.
`static void` | `writePrevious(javax.servlet.jsp.PageContext pageContext, java.lang.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.

Methods inherited from class java.lang.Object
`, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait`

Field Detail

### messages

    protected static MessageResources messages

  The message resources for this package.

Constructor Detail

### ResponseUtils

    public ResponseUtils()

Method Detail

### filter

    public static java.lang.String filter(java.lang.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.
  Parameters:
    `value` - The string to be filtered and returned

### write

    public static void write(javax.servlet.jsp.PageContext pageContext,
                             java.lang.String text)
                      throws javax.servlet.jsp.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.
  Parameters:
    `pageContext` - The PageContext object for this page
    `text` - The text to be written
  Throws:
    `javax.servlet.jsp.JspException` - if an input/output error occurs (already saved)

### writePrevious

    public static void writePrevious(javax.servlet.jsp.PageContext pageContext,
                                     java.lang.String text)
                              throws javax.servlet.jsp.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.
  Parameters:
    `pageContext` - The PageContext object for this page
    `text` - The text to be written
  Throws:
    `javax.servlet.jsp.JspException` - if an input/output error occurs (already saved)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2001 - Apache Software Foundation