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

JSP File Size Exceeded - 8050 lines of code in JSP - Help needed

 
Sakthi Ramasamy
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a JSP File which holds more than 8050 lines of code. When we try to add new lines, the WAS server complains that the file has exceeded its maximum size.

Is there any solution available to add further lines to the JSP file? Any suggestions would be much appreciated...

We have tried JSP Fragments but it is not able to pass the values to and fro....

Thanks in advance...
 
Stefan Evans
Bartender
Posts: 1640
9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without knowing more about the structure of your page, it is hard to know the exact approach to take, but the general advice is: Make your JSP smaller.

- If you have large amounts of java/scriptlet code in your JSP, the logic into a java class and invoke it as a method.
- if you have large amounts of display logic, encapsulate it in a custom tag to do the rendering.
- Break the page up into multiple steps, or alternative branches. One JSP for each step/branch and a master JSP to forward/include the appropriate sections (or even better a servlet page controller)





 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic