If you have a really big JSP file, and you get this problem, you can try
breaking the JSP file up in to several smaller .jsp or .tag files, and
creating a hierarchy of files.

This will not only fix your problem, but if done correctly will result
in a much better JSP page architecture.

We really like using jsp tagfiles to break up our jsps.  they are new to
JSP 2.0 (although that's not really very new anymore).  they essentially
allow you to create a custom jsp tag in JSP instead of in Java.

the alternative is just to break out chunks of your jsp code in to a
different .jsp file and use jsp:import to include it in the original jsp
file.  a less powerful approach, but it will fix your problem.

..mike..

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary Zhu
Sent: Saturday, September 08, 2007 11:28 PM
To: General Discussion for the Resin application server
Subject: Re: [Resin-interest] code too large for try statement error!

To solve your problem, make sure that your JSP compiled/generated Java
files do not have try blocks and Java methods too large, for (rough)
example, exceeding 10,000 lines. It's just the limitation of try blocks
and java methods, the size of java file has no limit.

When a java file is compiled into .class file, there is a limitation in
"JVM spec" that try block represented in the java byte code cannot
exceed 64K. Since the largest try block could be the entire Java method
(a method throws exceptions),  this 64K limitation is also
(conveniently) imposed on each Java method.

________________________________________
From: [EMAIL PROTECTED]
[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED]
[EMAIL PROTECTED]
Sent: Saturday, September 08, 2007 9:43 AM
To: resin-interest@caucho.com
Subject: [Resin-interest] code too large for try statement error!

What should I do to fix the jsp page when resin server ran into the
following errors?

code too large for try statement

-Henry


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to