Tomcat 6.0.20 does not include imports from included JSP, i.e., - JSP A includes JSP B. - JSP B has some page imports Result: JSP A is not able to see page imports imported in JSP B - the page imports imported in JSP B are not imported on JSP A generated class file. Expected Result: JSP A is able to see page imports imported in JSP B This worked in Tomcat 6.0.18.
please attach an example which reproduces this situation. I was unable to reproduce in a very simplistic setting.
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.
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.
I'll take a look.
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
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
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.
Better fix is now in trunk and proposed for 6.0.x. I went for a patch that kept the changes in parser.
This has been fixed in 6.0.x and will be included in 6.0.21 onwards.
*** Bug 47466 has been marked as a duplicate of this bug. ***