Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes custom error page Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "custom error page" Watch "custom error page" New topic
Author

custom error page

Anuj Batra
Greenhorn

Joined: Sep 18, 2011
Posts: 24
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

Joined: Jan 10, 2002
Posts: 56191
    
  13

There is nothing Tomcat-specific about this so it's been moved to the Servlets forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Stoian Azarov
Ranch Hand

Joined: Jun 01, 2011
Posts: 111
This is pseudo code how you can do it in web.xml
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: custom error page
 
Similar Threads
customized error page in struts
Custom error pages
Error Page Not Found
printing exception object through jsp expressions.
Custom error messages per application