Class ParseSupport

  • All Implemented Interfaces:
    java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
    Direct Known Subclasses:
    ParseTag, ParseTag

    public abstract class ParseSupport
    extends javax.servlet.jsp.tagext.BodyTagSupport

    Support for tag handlers for <parse>, the XML parsing tag.

    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ParseSupport.JstlEntityResolver
      Lets us resolve relative external entities.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.xml.parsers.DocumentBuilder db  
      private javax.xml.parsers.DocumentBuilderFactory dbf  
      protected org.xml.sax.XMLFilter filter  
      private int scope  
      private int scopeDom  
      protected java.lang.String systemId  
      private javax.xml.transform.TransformerFactory tf  
      private javax.xml.transform.sax.TransformerHandler th  
      private java.lang.String var  
      private java.lang.String varDom  
      protected java.lang.Object xml  
      • Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        bodyContent
      • Fields inherited from class javax.servlet.jsp.tagext.TagSupport

        id, pageContext
      • Fields inherited from interface javax.servlet.jsp.tagext.BodyTag

        EVAL_BODY_BUFFERED, EVAL_BODY_TAG
      • Fields inherited from interface javax.servlet.jsp.tagext.IterationTag

        EVAL_BODY_AGAIN
      • Fields inherited from interface javax.servlet.jsp.tagext.Tag

        EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      ParseSupport()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int doEndTag()  
      private void init()  
      private org.w3c.dom.Document parseInputSource​(org.xml.sax.InputSource s)
      Parses the given InputSource into a Document.
      private org.w3c.dom.Document parseInputSourceWithFilter​(org.xml.sax.InputSource s, org.xml.sax.XMLFilter f)
      Parses the given InputSource after, applying the given XMLFilter.
      private org.w3c.dom.Document parseReader​(java.io.Reader r)
      Parses the given Reader into a Document.
      private org.w3c.dom.Document parseReaderWithFilter​(java.io.Reader r, org.xml.sax.XMLFilter f)
      Parses the given Reader after applying the given XMLFilter.
      private org.w3c.dom.Document parseString​(java.lang.String s)
      Parses the given String into a Document.
      private org.w3c.dom.Document parseStringWithFilter​(java.lang.String s, org.xml.sax.XMLFilter f)
      Parses the given String after applying the given XMLFilter.
      private org.w3c.dom.Document parseURL​(java.lang.String url)
      Parses the URL (passed as a String) into a Document.
      private org.w3c.dom.Document parseURLWithFilter​(java.lang.String url, org.xml.sax.XMLFilter f)
      Parses the given Reader after applying the given XMLFilter.
      void release()  
      void setScope​(java.lang.String scope)  
      void setScopeDom​(java.lang.String scopeDom)  
      void setVar​(java.lang.String var)  
      void setVarDom​(java.lang.String varDom)  
      • Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

        doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent
      • Methods inherited from class javax.servlet.jsp.tagext.TagSupport

        findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface javax.servlet.jsp.tagext.Tag

        getParent, setPageContext, setParent
    • Field Detail

      • xml

        protected java.lang.Object xml
      • systemId

        protected java.lang.String systemId
      • filter

        protected org.xml.sax.XMLFilter filter
      • var

        private java.lang.String var
      • varDom

        private java.lang.String varDom
      • scope

        private int scope
      • scopeDom

        private int scopeDom
      • dbf

        private javax.xml.parsers.DocumentBuilderFactory dbf
      • db

        private javax.xml.parsers.DocumentBuilder db
      • tf

        private javax.xml.transform.TransformerFactory tf
      • th

        private javax.xml.transform.sax.TransformerHandler th
    • Constructor Detail

      • ParseSupport

        public ParseSupport()
    • Method Detail

      • init

        private void init()
      • doEndTag

        public int doEndTag()
                     throws javax.servlet.jsp.JspException
        Specified by:
        doEndTag in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
        Throws:
        javax.servlet.jsp.JspException
      • release

        public void release()
        Specified by:
        release in interface javax.servlet.jsp.tagext.Tag
        Overrides:
        release in class javax.servlet.jsp.tagext.BodyTagSupport
      • parseInputSourceWithFilter

        private org.w3c.dom.Document parseInputSourceWithFilter​(org.xml.sax.InputSource s,
                                                                org.xml.sax.XMLFilter f)
                                                         throws org.xml.sax.SAXException,
                                                                java.io.IOException
        Parses the given InputSource after, applying the given XMLFilter.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • parseReaderWithFilter

        private org.w3c.dom.Document parseReaderWithFilter​(java.io.Reader r,
                                                           org.xml.sax.XMLFilter f)
                                                    throws org.xml.sax.SAXException,
                                                           java.io.IOException
        Parses the given Reader after applying the given XMLFilter.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • parseStringWithFilter

        private org.w3c.dom.Document parseStringWithFilter​(java.lang.String s,
                                                           org.xml.sax.XMLFilter f)
                                                    throws org.xml.sax.SAXException,
                                                           java.io.IOException
        Parses the given String after applying the given XMLFilter.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • parseURLWithFilter

        private org.w3c.dom.Document parseURLWithFilter​(java.lang.String url,
                                                        org.xml.sax.XMLFilter f)
                                                 throws org.xml.sax.SAXException,
                                                        java.io.IOException
        Parses the given Reader after applying the given XMLFilter.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • parseInputSource

        private org.w3c.dom.Document parseInputSource​(org.xml.sax.InputSource s)
                                               throws org.xml.sax.SAXException,
                                                      java.io.IOException
        Parses the given InputSource into a Document.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • parseReader

        private org.w3c.dom.Document parseReader​(java.io.Reader r)
                                          throws org.xml.sax.SAXException,
                                                 java.io.IOException
        Parses the given Reader into a Document.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • parseString

        private org.w3c.dom.Document parseString​(java.lang.String s)
                                          throws org.xml.sax.SAXException,
                                                 java.io.IOException
        Parses the given String into a Document.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • parseURL

        private org.w3c.dom.Document parseURL​(java.lang.String url)
                                       throws org.xml.sax.SAXException,
                                              java.io.IOException
        Parses the URL (passed as a String) into a Document.
        Throws:
        org.xml.sax.SAXException
        java.io.IOException
      • setVar

        public void setVar​(java.lang.String var)
      • setVarDom

        public void setVarDom​(java.lang.String varDom)
      • setScope

        public void setScope​(java.lang.String scope)
      • setScopeDom

        public void setScopeDom​(java.lang.String scopeDom)