private Node . Nodes doParse ( String inFileName , Node parent , URL jarFileUrl ) throws FileNotFoundException , JasperException , IOException { Node . Nodes parsedPage = null ; isEncodingSpecifiedInProlog = false ; isDefaultPageEncoding = false ; hasBom = false ; JarFile jarFile = getJarFile ( jarFileUrl ) ; String absFileName = resolveFileName ( inFileName ) ; String jspConfigPageEnc = getJspConfigPageEncoding ( absFileName ) ; // Figure out what type of JSP document and encoding type we are // dealing with determineSyntaxAndEncoding ( absFileName , jarFile , jspConfigPageEnc ) ; if ( parent != null ) { // Included resource, add to dependent list compiler . getPageInfo ( ) . addDependant ( absFileName ) ; } comparePageEncodings ( jspConfigPageEnc ) ; // Dispatch to the appropriate parser if ( isXml ) { // JSP document (XML syntax) // InputStream for jspx page is created and properly closed in // JspDocumentParser. parsedPage = JspDocumentParser . parse ( this , absFileName , jarFile , parent , isTagFile , directiveOnly , sourceEnc , jspConfigPageEnc , isEncodingSpecifiedInProlog ) ; } else { // Standard syntax InputStreamReader inStreamReader = null ; try { inStreamReader = JspUtil . getReader ( absFileName , sourceEnc , jarFile , ctxt , err ) ; JspReader jspReader = new JspReader ( ctxt , absFileName , sourceEnc , inStreamReader , err ) ; parsedPage = Parser . parse ( this , absFileName , jspReader , parent , isTagFile , directiveOnly , jarFileUrl , sourceEnc , jspConfigPageEnc , isDefaultPageEncoding , hasBom ) ; } finally { if ( inStreamReader != null ) { try { inStreamReader . close ( ) ; } catch ( Exception any ) { } } } } if ( jarFile != null ) { try { jarFile . close ( ) ; } catch ( Throwable t ) { } } baseDirStack . pop ( ) ; return parsedPage ; }
Parses the JSP page or tag file with the given path name .