File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

code size too large for try catch block in JSP

 
Nilesh Raje
Ranch Hand
Posts: 153
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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),
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nilesh Raje
Ranch Hand
Posts: 153
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic