kinman 2004/05/06 15:55:23 Modified: jasper2/src/share/org/apache/jasper JspCompilationContext.java jasper2/src/share/org/apache/jasper/compiler JspDocumentParser.java TagFileProcessor.java Log: - Fix a bug where the out-dated version of TagInfo instance of a tag file is used when compiling the tag file. Revision Changes Path 1.47 +4 -0 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java Index: JspCompilationContext.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspCompilationContext.java,v retrieving revision 1.46 retrieving revision 1.47 diff -u -r1.46 -r1.47 --- JspCompilationContext.java 20 Apr 2004 00:05:09 -0000 1.46 +++ JspCompilationContext.java 6 May 2004 22:55:23 -0000 1.47 @@ -327,6 +327,10 @@ return tagInfo; } + public void setTagInfo(TagInfo tagi) { + tagInfo = tagi; + } + /** * True if we are compiling a tag file in prototype mode. * ie we only generate codes with class for the tag handler with empty 1.80 +2 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java Index: JspDocumentParser.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/JspDocumentParser.java,v retrieving revision 1.79 retrieving revision 1.80 diff -u -r1.79 -r1.80 --- JspDocumentParser.java 16 Apr 2004 23:22:30 -0000 1.79 +++ JspDocumentParser.java 6 May 2004 22:55:23 -0000 1.80 @@ -331,6 +331,7 @@ if (tagDependentPending && JSP_URI.equals(uri) && localName.equals(BODY_ACTION)) { + tagDependentPending = false; tagDependentNesting++; current = parseStandardAction( @@ -341,7 +342,6 @@ taglibAttrs, startMark, current); - tagDependentPending = false; return; } @@ -407,7 +407,7 @@ current); } else { // custom action - String bodyType = getBodyType((Node.CustomTag) node); + String bodyType = getBodyType((Node.CustomTag) node); if (scriptlessBodyNode == null && bodyType.equalsIgnoreCase(TagInfo.BODY_CONTENT_SCRIPTLESS)) { 1.58 +7 -0 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java Index: TagFileProcessor.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/TagFileProcessor.java,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- TagFileProcessor.java 17 Mar 2004 19:23:03 -0000 1.57 +++ TagFileProcessor.java 6 May 2004 22:55:23 -0000 1.58 @@ -483,6 +483,13 @@ (URLClassLoader) ctxt.getClassLoader()); wrapper.getJspEngineContext().setClassPath(ctxt.getClassPath()); } + else { + // Make sure that JspCompilationContext gets the latest TagInfo + // for the tag file. TagInfo instance was created the last + // time the tag file was scanned for directives, and the tag + // file may have been modified since then. + wrapper.getJspEngineContext().setTagInfo(tagInfo); + } Class tagClazz; int tripCount = wrapper.incTripCount();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]