| java.lang.Object javax.servlet.jsp.tagext.TagLibraryValidator javax.servlet.jsp.jstl.tlv.ScriptFreeTLV
ScriptFreeTLV | public class ScriptFreeTLV extends TagLibraryValidator (Code) | | 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:
- allowDeclarations: if true, indicates that declaration elements
are not prohibited.
- allowScriptlets: if true, indicates that scriptlets are not
prohibited
- allowExpressions: if true, indicates that top-level expression
elements (i.e., expressions not associated with request-time attribute
values) are not prohibited.
- allowRTExpressions: if true, indicates that expression elements
associated with request-time attribute values are not prohibited.
The default value for all for initialization parameters is false,
indicating all forms of scripting elements are to be prohibited.
author: Mark A. Kolb author: Shawn Bayern (minor changes) |
Constructor Summary | |
public | ScriptFreeTLV() Constructs a new validator instance. |
Method Summary | |
public void | setInitParameters(Map<String, Object> initParms) Sets the values of the initialization parameters, as supplied in the TLD. | public ValidationMessage[] | validate(String prefix, String uri, PageData page) Validates a single JSP page.
Parameters: prefix - the namespace prefix specified by the page for thecustom tag library being validated. Parameters: uri - the URI specified by the page for the TLD of thecustom tag library being validated. Parameters: page - a wrapper around the XML representation of the pagebeing validated. |
ScriptFreeTLV | public ScriptFreeTLV()(Code) | | Constructs a new validator instance.
Initializes the parser factory to create non-validating, namespace-aware
SAX parsers.
|
setInitParameters | public void setInitParameters(Map<String, Object> initParms)(Code) | | Sets the values of the initialization parameters, as supplied in the TLD.
Parameters: initParms - a mapping from the names of the initialization parametersto their values, as specified in the TLD. |
validate | public ValidationMessage[] validate(String prefix, String uri, PageData page)(Code) | | Validates a single JSP page.
Parameters: prefix - the namespace prefix specified by the page for thecustom tag library being validated. Parameters: uri - the URI specified by the page for the TLD of thecustom tag library being validated. Parameters: page - a wrapper around the XML representation of the pagebeing validated. null, if the page is valid; otherwise, a ValidationMessage[]containing one or more messages indicating why the page is not valid. |
|
|