|Summary:||Tomcat 6.0.20 does not include imports from included JSP|
|Component:||Jasper||Assignee:||Tomcat Developers Mailing List <dev>|
webapp with tag files fail
Patch for jasper
Description fitness_mania 2009-06-04 19:21:41 UTC
Comment 1 Tim Funk 2009-06-05 04:32:53 UTC
please attach an example which reproduces this situation. I was unable to reproduce in a very simplistic setting.
Comment 2 fitness_mania 2009-06-05 08:46:05 UTC
Created attachment 23763 [details] include-prelude sample I forgot to mention that this happened when using JSP include-prelude. I did not try include-coda though. I have attached a sample.
Comment 3 Tim Funk 2009-06-05 11:53:30 UTC
It seems like this might be the culprit: http://svn.apache.org/viewvc?view=rev&revision=708165 This does look a little serious since its convenient to stick directives into a include-prelude so that all (or a group) of files can all get the same directives. Also moving status back to new - since the attached patch does reproduce the issue.
Comment 4 Mark Thomas 2009-06-05 13:59:28 UTC
I'll take a look.
Comment 5 Mark Thomas 2009-06-05 16:49:32 UTC
Yep, that patch was the culprit although a little indirectly. It has been fixed in trunk and the patch proposed for 6.0.x. I've also added it to the 5.5.x back port
Comment 6 Tim Funk 2009-06-08 06:07:38 UTC
Created attachment 23775 [details] webapp with tag files fail The same war file as previous attached with the new use case where tag file fail Now fails with javax.servlet.error.exception: java.lang.RuntimeException: org.apache.jasper.JasperException: ... <%@ page directive cannot be used in a tag file
Comment 7 Tim Funk 2009-06-09 10:08:14 UTC
Created attachment 23781 [details] Patch for jasper Here is a patch derived from 6.0.x [https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk ] Changed files are - java/org/apache/jasper/compiler/ParserController.java - java/org/apache/jasper/compiler/Compiler.java It works on both test cases attached to the bug as well as some other code I have locally. Placing here instead of committing to trunk since this is my first dive into jasper.
Comment 8 Mark Thomas 2009-06-10 05:33:15 UTC
Better fix is now in trunk and proposed for 6.0.x. I went for a patch that kept the changes in parser.
Comment 9 Mark Thomas 2009-06-12 15:43:47 UTC
This has been fixed in 6.0.x and will be included in 6.0.21 onwards.
Comment 10 Mark Thomas 2009-07-02 05:02:54 UTC
*** Bug 47466 has been marked as a duplicate of this bug. ***