This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom error pages

 
Aaron John
Ranch Hand
Posts: 74
  • 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
  • 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
  • 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
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 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>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic