File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom error pages

 
Aaron John
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this is the right place to post this. I would like to display a custom error page for a web app. The error page has to display all exceptions thrown by our app, as well as Velocity. Does anyone have any experience in this? Is there something I can configure in Velocity in order to achieve this? Thanks.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure if there is a velocity specific way to do this but the servlet spec provides a mechanism by which you can define custom error pages from within your deployment descriptor (web.xml)
 
Aaron John
Ranch Hand
Posts: 74
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for reply. Yes I know of this method. However, I'm not sure why exceptions from Velocity do not get handled even with those entries in web.xml. Anyone have any ideas?
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know Velocity, but maybe you could try with <error-type> instead of <error-code>
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic