my dog learned polymorphism
The moose likes Tomcat and the fly likes <error-page> tag issue 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 » Products » Tomcat
Reply Bookmark "<error-page> tag issue" Watch "<error-page> tag issue" New topic
Author

<error-page> tag issue

Lou Pellegrini
Ranch Hand

Joined: Nov 11, 2003
Posts: 105
Hi,

When I force error code 500 from my HelloWorld servlet I get the standard Internet Explorer "The website cannot display the page" and "HTTP 500 " instead of the Error.html shown below.

When I comment out the <error-page> tag in web.xml I get the Apache Tomcat Error report.

When I enter http://localhost:8080/webdev/Error.html into my browser address, I do get the error page below.

So I think it myst be an issue with the <error-page> tag itself.

Can someone help me get the <error-page> tag working? The servlet HelloWorld is working fine.

Thanks,

Lou

C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\WEB-INF\web.xml


My C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\webdev\Error.html

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56192
    
  13

Have you tried observing the behavior in other browsers?


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Lou Pellegrini
Ranch Hand

Joined: Nov 11, 2003
Posts: 105
Works correctly with Firefox.

I just downloaded and installed Firefox 5.0.1 to answer your question.

Internet Explorer 8.0.6001.18702 is where the <error-page> tag is working incorrectly.
Lou Pellegrini
Ranch Hand

Joined: Nov 11, 2003
Posts: 105
I found the solution.



OK, it sounds like you might be looking at MSIE's 'Friendly Error Screen'

Go to Tools -> Options -> Advanced (tab) and uncheck the "Show Friendly Errors" checkbox.
Then try again.


Thanks for the reply Bear!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56192
    
  13

Yeah, that's kinda what I was leading to when asking about other browsers.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: <error-page> tag issue
 
Similar Threads
Trouble with Struts
Web.XMl in JSP
Running Servlets, have a question
Custom Tag Problem
HTTP Status 404 servlet error ("The requested resource is not available")