-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Nick,
On 4/7/2011 11:20 AM, Nick Williams wrote: > 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." Huge JSPs are very sensitive to the exact version of Jasper (Tomcat's JSP engine) and the compiler (JDT) that you are using. Certain changes in the implementation of Jasper may or may not generate methods with too much bytecode, and certain versions of the compiler may have different bytecode optimizations that can be performed and might get you under the 64k method-size ceiling. > 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. It's likely a combination of the two. > 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. JBoss uses Tomcat internally, and I suspect that it also uses Jasper as well. Other vendors' servers may have features that either reduce the amount of code generated for your JSP, or split your JSP into several methods. Tomcat evidently does not do this kind of thing. Or, it's just dumb luck. I don't know any way for Jasper to know how much bytecode a particular method will generate. You can't even do things like count lines of generated-source because a line of source code can be arbitrarily complex, so you just have to guess. I suppose if Jasper were to compile on-the-fly and take evasive action when the bytecode count gets sufficiently high, it would be possible. Patches are always welcome :) - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk2d/coACgkQ9CaO5/Lv0PAIBACfZVhnPGgk2JBQv7AXMgKtqYVk G8IAn1Uqc6od40EWHet9AK8Rd7TTME0k =DJH/ -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org