private class ScriptFreeTLV.MyContentHandler
extends org.xml.sax.helpers.DefaultHandler
Modifier and Type | Field and Description |
---|---|
private int |
declarationCount |
private int |
expressionCount |
private int |
rtExpressionCount |
private int |
scriptletCount |
Modifier | Constructor and Description |
---|---|
private |
MyContentHandler() |
Modifier and Type | Method and Description |
---|---|
private void |
countRTExpressions(org.xml.sax.Attributes atts)
Auxiliary method for checking attribute values to see if
are specified via request-time attribute values.
|
javax.servlet.jsp.tagext.ValidationMessage[] |
reportResults()
Constructs a String reporting the number(s) of prohibited
scripting elements that were detected, if any.
|
void |
startElement(java.lang.String namespaceUri,
java.lang.String localName,
java.lang.String qualifiedName,
org.xml.sax.Attributes atts)
This event is received whenever a new element is encountered.
|
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
private int declarationCount
private int scriptletCount
private int expressionCount
private int rtExpressionCount
public void startElement(java.lang.String namespaceUri, java.lang.String localName, java.lang.String qualifiedName, org.xml.sax.Attributes atts)
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
private void countRTExpressions(org.xml.sax.Attributes atts)
public javax.servlet.jsp.tagext.ValidationMessage[] reportResults()
TODO: The update from 7/13/2001 merely makes this validator compliant with the new TLV API, but does not fully take advantage of this API. In the future, we should do so... but because of the possibility that anti-script checking will be incorporated into the base TLV, I've held off for now and just changed this class to use the new API. -- SB.