File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes code size too large for try catch block in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "code size too large for try catch block in JSP" Watch "code size too large for try catch block in JSP" New topic
Author

code size too large for try catch block in JSP

Nilesh Raje
Ranch Hand

Joined: Aug 02, 2005
Posts: 153
Hi JSP Developers,

I am getting this error in JSP of "code size too large for try catch block" and when I looked into the compiled java file it has this huge block of code translated from the included JSPs inside of a try catch block.

The lines of code for this JSP is 4500. I tried using include file and action jsp include. also its not working. can any one help me.

I read on website that we can configure it on Weblogic server in the xml file. But i am Using TOMCAT. Can any one help me in this.

I was wondering if there is something wrong I am doing in the way I am including the JSPs..

is there any approach to address this problem of code size too large in JSP Any experience with the same problem or insights into the same is appreciated.

Thanks! (in anticipation),


Thanks and Regards,<br />Nilesh<br />SCJP 1.4, SCWCD 1.4
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

That much code in a single JSP is usually a sign that some refactoring needs to be done.

How are you including files with the JSP directive (<%@...) or with a JSP action (<jsp:include.. )?

The former merges the code before compiling which will do you no good in this case. The latter is executed as a separate servet. the results are then merged at run time with its host page.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Nilesh Raje
Ranch Hand

Joined: Aug 02, 2005
Posts: 153
Yes i tried both compile time and run time include. Bascially its loads of logic struts tag.!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: code size too large for try catch block in JSP