Class PermittedTaglibsTLV


  • public class PermittedTaglibsTLV
    extends javax.servlet.jsp.tagext.TagLibraryValidator

    A TagLibraryValidator class to allow a TLD to restrict what taglibs (in addition to itself) may be imported on a page where it's used.

    This TLV supports the following initialization parameter:

    • permittedTaglibs: A whitespace-separated list of URIs corresponding to tag libraries permitted to be imported on the page in addition to the tag library that references PermittedTaglibsTLV (which is allowed implicitly).

    This implementation only detects tag libraries declared on the <jsp:root> element, including libraries in regular JSP files or JSP Documents with a specific <jsp:root>. It does not detect libraries declared on other elements as supported by JSP 2.0.

    Author:
    Shawn Bayern
    • Constructor Detail

      • PermittedTaglibsTLV

        public PermittedTaglibsTLV()
    • Method Detail

      • setInitParameters

        public void setInitParameters​(Map<String,​Object> initParams)
        Overrides:
        setInitParameters in class javax.servlet.jsp.tagext.TagLibraryValidator
      • validate

        public javax.servlet.jsp.tagext.ValidationMessage[] validate​(String prefix,
                                                                     String uri,
                                                                     javax.servlet.jsp.tagext.PageData page)
        Overrides:
        validate in class javax.servlet.jsp.tagext.TagLibraryValidator