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 is too large for try catch statement in JSP

 
MNaresh Kumar
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 5700. I tried using include file and action jsp include. also its not working. can any one help me.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33674
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MNaresh,
Welcome to JavaRanch!

What kind of things do you have inside your JSP? In particular, do you have any code in there and what does it do? I'm having trouble picturing just HTML being that big. The answer to this will help us suggest a solution.
 
MNaresh Kumar
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,These code fetch from so many pages & accumulated in single page.Whn i try to see the display of the page during that time im getting this error.My jsp contain 5500 lines & more.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Modern JSPs should contain no code, with the code factored out into controllers called prior to the JSP invocation, or code abstracted into custom tags. Perhaps it is time to refactor your code using more modern standards?
 
MNaresh Kumar
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thq for your response still i need a clarification on this,In this page i too use some custom tag(tag lib),but i cannt use it for many places in this page,could you please suggest me solution.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33674
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MNaresh,
Custom tags are fine. Can you give an example of what kind of things you do in the code of your JSP? Accumulating from other pages is fine. That still leaves me with the question of what they do.

You will get more concrete advice if you provide more concrete details about your pages.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic