kinman 2004/01/22 17:50:08 Modified: jasper2/src/share/org/apache/jasper/compiler Compiler.java TagFileProcessor.java Log: Fix 26335: Modification check for tagfiles does not work recursively. Get reliable dependency info from the tag instance. Revision Changes Path 1.77 +4 -2 jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java Index: Compiler.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v retrieving revision 1.76 retrieving revision 1.77 diff -u -r1.76 -r1.77 --- Compiler.java 22 Jan 2004 19:35:07 -0000 1.76 +++ Compiler.java 23 Jan 2004 01:50:08 -0000 1.77 @@ -561,8 +561,10 @@ //System.out.println("Compiler: outdated, include old " + include ); outDated = true; } - // Remove any potential Wrappers for tag files - ctxt.getRuntimeContext().removeWrapper(include); + if (outDated) { + // Remove any potential Wrappers for tag files + ctxt.getRuntimeContext().removeWrapper(include); + } } catch (Exception e) { e.printStackTrace(); outDated = true; 1.56 +15 -9 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.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- TagFileProcessor.java 10 Dec 2003 00:24:23 -0000 1.55 +++ TagFileProcessor.java 23 Jan 2004 01:50:08 -0000 1.56 @@ -81,6 +81,7 @@ import org.apache.jasper.JasperException; import org.apache.jasper.JspCompilationContext; import org.apache.jasper.servlet.JspServletWrapper; +import org.apache.jasper.runtime.JspSourceDependent; /** * 1. Processes and extracts the directive info in a tag file. @@ -556,14 +557,19 @@ } // Add the dependants for this tag file to its parent's - // dependant list. - PageInfo pageInfo = wrapper.getJspEngineContext().getCompiler(). - getPageInfo(); - if (pageInfo != null) { - Iterator iter = pageInfo.getDependants().iterator(); - if (iter.hasNext()) { - parentPageInfo.addDependant((String)iter.next()); + // dependant list. The only reliable dependency information + // can only be obtained from the tag instance. + try { + Object tagIns = tagClazz.newInstance(); + if (tagIns instanceof JspSourceDependent) { + Iterator iter = + ((JspSourceDependent)tagIns).getDependants().iterator(); + while (iter.hasNext()) { + parentPageInfo.addDependant((String)iter.next()); + } } + } catch (Exception e) { + // ignore errors } return tagClazz;
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]