Bug 49935

Summary: recursive tag calls don't work
Product: Tomcat 5 Reporter: Peter Giles <gilesp>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: major CC: ewestfal
Priority: P2    
Version: 5.5.31   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: web app demonstrating the issue
image showing how the page renders on other versions of Tomcat

Description Peter Giles 2010-09-15 18:22:33 UTC
Created attachment 26028 [details]
web app demonstrating the issue

If a tag calls itself recursively, it doesn't work in Tomcat 5.5.30.  This has been observed on Linux, but (for whatever reasons) may not manifest on other operating systems.  I specifically reproduced the issue using 

java version "1.6.0_20" 
Java(TM) SE Runtime Environment (build 1.6.0_20-b02) 
Java HotSpot(TM) 64-Bit Server VM (build 16.3-b01, mixed mode) 

I'm attaching a simple war that renders (at the context root) a page with a recursive table structure on other versions of Tomcat (I tried 5.5.28 & 6.0.29), but not in 5.5.30.  Similar tag calls in our application have resulted in the following stack trace on this Tomcat version:

2010-09-15 00:07:43,031 [http-8080-Processor24] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/kr-dev].[jsp] - Servlet.service() for servlet jsp threw exception 
java.io.FileNotFoundException: no such file: /java/servers/apache-tomcat-5.5.30/work/Catalina/localhost/kr-dev/org/apache/jsp/tag/web/kr/rowDisplay_tag$Helper.class 
at org.apache.jasper.compiler.SmapUtil$SDEInstaller.<init>(SmapUtil.java:253) 
at org.apache.jasper.compiler.SmapUtil$SDEInstaller.install(SmapUtil.java:241) 
at org.apache.jasper.compiler.SmapUtil.installSmap(SmapUtil.java:165) 
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:466) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:319) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) 
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) 
at org.apache.jasper.servlet.JspServletWrapper.loadTagFile(JspServletWrapper.java:207) 
at org.apache.jasper.compiler.TagFileProcessor.loadTagFile(TagFileProcessor.java:566) 
at org.apache.jasper.compiler.TagFileProcessor.access$000(TagFileProcessor.java:50) 
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:617) 
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) 
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166) 
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216) 
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:621) 
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) 
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166) 
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216) 
at org.apache.jasper.compiler.TagFileProcessor$TagFileLoaderVisitor.visit(TagFileProcessor.java:621) 
at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1442) 
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166) 
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2216) 
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2222) 
at org.apache.jasper.compiler.Node$Root.accept(Node.java:457) 
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2166) 
at org.apache.jasper.compiler.TagFileProcessor.loadTagFiles(TagFileProcessor.java:635) 
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:200) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:317) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:298) 
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:286) 
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:565) 
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:309) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:308) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:259) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
...
Comment 1 Peter Giles 2010-09-15 18:28:01 UTC
Created attachment 26029 [details]
image showing how the page renders on other versions of Tomcat
Comment 2 Peter Giles 2010-09-20 14:41:59 UTC
I verified that this issue still exists in Tomcat 5.5.31 as well.  Not sure how to flag the issue for that since the version isn't known to Bugzilla yet.
Comment 3 Mark Thomas 2010-09-20 16:30:09 UTC
Added 5.5.31 and updated the issue
Comment 4 Mark Thomas 2010-09-27 15:15:32 UTC
This was previously fixed in 6.0.x. I back-ported the relevant patches to 5.5.x and they do fix the issue. The combined patch has been proposed for 5.5.x
Comment 5 Mark Thomas 2010-10-26 12:08:13 UTC
This has been fixed in 5.5.x and will be included in 5.5.32 onwards.