public void include(String relativeUrlPath, boolean flush) throws ServletException, IOException { include(relativeUrlPath, false); // XXX } just calls itself it seems. Perhaps this should be (just a guess): public void include(String relativeUrlPath, boolean flush) throws ServletException, IOException { invokingJspCtxt.include(relativeUrlPath, false); // XXX } This came up for me when I had a .tag file that had an include in it. I was using Tomcat 5.5 but looking at the source of JspContextWrapper.java it looks like this issue is in 5.5 as well as 6 (and the svn trunk).
I have tried to repeat this with 5.5.x and 6.0.x but have not had any luck. I've also reviewed the code to see if I could find where the method is called but couldn't find anywhere. Could you provide a simple test war that demonstrates the issue?
Created attachment 22504 [details] Demonstrates issue #45666 See /WEB-INF/tags/tag.tag To demonstrate the issue, access the /index.jsp page. Expected result: A page with "Hello world!" message. Actual result (in tc6.0): "HTTP Status 500" error page - java.lang.StackOverflowError Replacing "include("/include.html", false);" call in tag.tag with include("/include.html"); displays the "Hello world!" message as expected.
Many thanks for the test case - it makes fixing bugs so much quicker. This has been fixed in trunk and proposed for 6.0.x and 5.5.x.
The patch has been applied to 6.0.x and will be included in 6.0.19 onwards.
any chance to get this into the 5.5 line? it's really quite a bogus bug with an obvious fix.
This has been fixed in 5.5.x and will be included in 5.5.28 onwards.