Class ReducedHTMLParser

  extended by org.apache.myfaces.renderkit.html.util.ReducedHTMLParser

public class ReducedHTMLParser
extends Object

A class which detects the open/close tags in an HTML document and reports them to a listener class.

This is unfortunately necessary when using JSF with JSP, as tags in the body of the document can need to output commands into the document at points earlier than the tag occurred (particularly into the document HEAD section). This can only be implemented by buffering the response and post-processing it to find the relevant HTML tags and modifying the buffer as needed.

This class tries to do the parsing as quickly as possible; many of the details of HTML are not relevant for the purposes this class is used for.

$Revision: 673833 $ $Date: 2008-07-03 16:58:05 -0500 (Thu, 03 Jul 2008) $

Field Summary
static int BODY_TAG
static int HEAD_TAG
static int SCRIPT_TAG
Method Summary
static void parse(CharSequence seq, CallbackListener l)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


public static final int BODY_TAG
See Also:
Constant Field Values


public static final int HEAD_TAG
See Also:
Constant Field Values


public static final int SCRIPT_TAG
See Also:
Constant Field Values
Method Detail


public static void parse(CharSequence seq,
                         CallbackListener l)

Copyright © 2012 The Apache Software Foundation. All Rights Reserved.