FileDocCategorySizeDatePackage
EncodeHTMLTag.javaAPI DocExample970Thu Jun 28 16:14:16 BST 2001com.ora.jsp.tags.generic

EncodeHTMLTag

public class EncodeHTMLTag extends BodyTagSupport
This class is a tag handler for custom action that replaces HTML special characters in its body with the corresponding HTML character entities.
author
Hans Bergsten, Gefion software
version
1.0

Fields Summary
Constructors Summary
Methods Summary
public intdoAfterBody()
Reads the body content, converts all HTML special characters with the corresponding HTML character entities, and adds the result to the response body.

        BodyContent bc = getBodyContent();
        JspWriter out = getPreviousOut();
        try {
            out.write(StringFormat.toHTMLString(bc.getString()));
        }
        catch (IOException e) {} // Ignore
        return SKIP_BODY;