Hi,

I had a jsp which is built using struts. It is 54 Kb.

Problem is page is not getting loading in JBoss server. Server console error is : “Code too large for try statement”.

When I see the java file what server generates for the jsp, all the (form)fields (all <tr> and <td>)are under out.println()… and all the out.printlns() are inside the try block.

Where as the same works fine using Weblogic server.

I copied some code in some other jsp and included that jsp using page directive include, thinking that page is heavy to load or to render.

If you have idea on this please give some inputs.

Regards,
Naresh

says it all.
A 54KB JSP is WAY too large.

ANY method in Java can contain at most 64KB of code. Your entire 54KB JSP ends up as part of a single method, expanded into Java code.
That's going to be one massive method, most likely several hundred KB of code.

If it works on WL, WL's JSP compiler does not conform to the language standard.

Split the thing up, organise it properly, start learning to use dynamic includes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.