• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Code size is too large for try catch statement in JSP

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic