https://bz.apache.org/bugzilla/show_bug.cgi?id=66292
Bug ID: 66292 Summary: JSP static include broken Product: Tomcat 9 Version: 9.0.67 Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P2 Component: Jasper Assignee: dev@tomcat.apache.org Reporter: san...@buskens.org Target Milestone: ----- Created attachment 38400 --> https://bz.apache.org/bugzilla/attachment.cgi?id=38400&action=edit Webapp with demonstration of static include compile error Some of our JSP pages with static includes which worked on Tomcat 9.0.65 broke on Tomcat 9.0.67. The behaviour manifests itself when you static include a JSP page from a subdirectory and then include a JSP from the base directory, like so: index.jsp contains 2 static includes to: subdir/subdir_include.jsp <-- this one works another_include.jsp <-- this one doesn't Having debugged the code the problem appears to be in the PageController.baseDirStack which looks differently after the subdir/subdir_include.jsp has been processed and the baseDirStack has been popped in PageController.doParse, in 9.0.65 the baseDirStack is defined as a Stack: private final Stack<String> baseDirStack = new Stack<>(); and popped near the end of doParse as baseDirStack.pop(); In Tomcat 9.0.67 this has now become a: private final Queue<String> baseDirStack = new ArrayDeque<>(); and it is popped near the end of doParse as: baseDirStack.remove(); On 9.0.67 this returns the wrong baseDir causing the another_include.jsp to not be found. I have included a test which demonstrates the difference in behaviour of the Stack.pop() and ArrayDeque.remove() and also a simplistic webapp to demonstrate the JSP compilation failure on 9.0.67. We stumbled on this problem on openjdk 11.0.16.1 but were able to also reproduce it on jdk8. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org