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 page

 
Anuj Batra
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I have to show a custom error page in tomcat.

I know this can be done by making an entry in web.xml

But there i have to specify each and every error response and errorpage.jsp.

Is there any way that i can specify a custom error page(I have only 1 error page to be displayed for all errors) if any in the world exception occurs ? I definitely do not want the visitor to have a look at the stack trace at all.

Thanks in advance for help
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64629
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is nothing Tomcat-specific about this so it's been moved to the Servlets forum.
 
Stoian Azarov
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is pseudo code how you can do it in web.xml
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic