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 - Out of Memory exception

 
Arun Kottol
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to trap the Out of memory exception given by JSP?
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's an Error, not an Exception.
Errors should not be caught in general because you can't do anything about them anyway.
 
Wendal Park
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try break down you JSP into a couple small JSPs using the include directive.

sometimes compiling a too large JSP page may give OutOfMemoryException in Tomcat ... that's what I had before
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's also a memoryleak in some versions of Tomcat pertaining to the JSP compiler where each compile will slowly eat up JVM memory until there's not enough left to even run a servlet or JSP and you'll get an OutOfMemoryError on every call.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic