Class ScriptFreeTLV

  extended by javax.servlet.jsp.tagext.TagLibraryValidator
      extended by javax.servlet.jsp.jstl.tlv.ScriptFreeTLV

public class ScriptFreeTLV
extends TagLibraryValidator

A TagLibraryValidator for enforcing restrictions against the use of JSP scripting elements.

This TLV supports four initialization parameters, for controlling which of the four types of scripting elements are allowed or prohibited:

The default value for all for initialization parameters is false, indicating all forms of scripting elements are to be prohibited.

Mark A. Kolb, Shawn Bayern (minor changes)

Constructor Summary
          Constructs a new validator instance.
Method Summary
 void setInitParameters(java.util.Map<java.lang.String,java.lang.Object> initParms)
          Sets the values of the initialization parameters, as supplied in the TLD.
 ValidationMessage[] validate(java.lang.String prefix, java.lang.String uri, PageData page)
          Validates a single JSP page.
Methods inherited from class javax.servlet.jsp.tagext.TagLibraryValidator
getInitParameters, release
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public ScriptFreeTLV()
Constructs a new validator instance. Initializes the parser factory to create non-validating, namespace-aware SAX parsers.

Method Detail


public void setInitParameters(java.util.Map<java.lang.String,java.lang.Object> initParms)
Sets the values of the initialization parameters, as supplied in the TLD.

setInitParameters in class TagLibraryValidator
initParms - a mapping from the names of the initialization parameters to their values, as specified in the TLD.


public ValidationMessage[] validate(java.lang.String prefix,
                                    java.lang.String uri,
                                    PageData page)
Validates a single JSP page.

validate in class TagLibraryValidator
prefix - the namespace prefix specified by the page for the custom tag library being validated.
uri - the URI specified by the page for the TLD of the custom tag library being validated.
page - a wrapper around the XML representation of the page being validated.
null, if the page is valid; otherwise, a ValidationMessage[] containing one or more messages indicating why the page is not valid.

Submit a bug or feature

Copyright © 2009-2011, Oracle Corporation and/or its affiliates. All Rights Reserved. Use is subject to license terms.

Generated on 10-February-2011 12:41

Scripting on this page tracks web page traffic, but does not change the content in any way.