I have an issue compiling several JSP files in Tomcat < 5.5.26 and Tomcat 7, but not in Tomcat 5.5.26 through 6.0.32. Ultimately, I'm going to fix the underlying problem in the JSP files (it will take some time), but I would like to get some community input as to the issue from a Tomcat / JDT Compiler standpoint.
Originally, I discovered some time ago that these JSP files would NOT compile in Tomcat 5.5.25 or below, throwing the following error: "The code of method _jspService(HttpServletRequest, HttpServletResponse) is exceeding the 65535 bytes limit." However, this problem did NOT occur with the EXACT same JSP code in Tomcat 5.5.26 or higher, which compiled my JSP files without error. So I tested in Tomcat 6.0.0 through 6.0.32, and no versions of Tomcat 6 ever threw this error. They all compiled my JSP files just fine. Also, Glassfish, WebSphere and WebLogic had no issues compiling my JSPs on any version, so I saw no need to fix the JSP files (although, ultimately they will be fixed when I improve the codebase). However, I wanted to understand better. I discovered that the Eclipse JDT compiler used in Tomcat was version 3.1.1 in Tomcat 5.5.25, but upgraded to 3.3.1 with Tomcat 5.5.26. I didn't think this could be coincidence. I looked at Tomcat 6 and discovered that the very first version of Tomcat 6 had version 3.2.0 of the JDT compiler. I came to the conclusion that a bug was fixed in the JDT compiler some time between versions 3.1.1 and 3.2.0 that resolved my problem, but I was never actually able to find that bug. Then, when testing Tomcat 7.0.12 the other day for production readiness, I discovered that the error had resurfaced. None of my JSPs will compile in Tomcat 7.0.12. They throw the exact same error. Looking at the source distribution, I discovered that Tomcat 7.0.12 is using JDT compiler version 3.6.2, a much newer version. So, either the problem has resurfaced in the JDT compiler, or the problem was never in the JDT compiler at all, but was instead in Tomcat. Any input? Like I said, I am going to fix these JSPs, but I would like to know what the heck is going on, and why I can compile these JSPs in every application server except Tomcat < 5.5.26, Tomcat 7 and JBoss 6. Thanks in advance for any input, Nick
smime.p7s
Description: S/MIME cryptographic signature