Eclipse compiles and runs this jsp just fine but when I deploy to Sun One 6.1 I get \"Code too large for try { \"
I\'m trying to loop over a list of beans while perf
The size limit in Java for a method is 65535 characters. You need to refactor that code. This website here has a solution. From the Java Spec:
The length of field and method names, field and method descriptors, and other constant string values is limited to 65535 characters by the 16-bit unsigned length item of the CONSTANT_Utf8_info structure (§4.4.7). Note that the limit is on the number of bytes in the encoding and not on the number of encoded characters. UTF-8 encodes some characters using two or three bytes. Thus, strings incorporating multibyte characters are further constrained.
Apparently, this is common with dynamically generated JSP.
And, since you may be blocked at work - here is the recommended solution from that site:
Help your container modularize the code. Try splitting the JSP into several chunks and make dynamic includes instead of static ones. Dynamic includes (jsp:include against %@include) will compile the JSP and then stream the output instead of trying to include all the code into one big method or try catch block.