aspose file tools*
The moose likes Tomcat and the fly likes <error-page> tag issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "<error-page> tag issue" Watch "<error-page> tag issue" New topic
Author

<error-page> tag issue

Lou Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
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: 61426
    
  67

Have you tried observing the behavior in other browsers?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Lou Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
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 Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
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: 61426
    
  67

Yeah, that's kinda what I was leading to when asking about other browsers.
 
Don't get me started about those stupid light bulbs.
 
subject: <error-page> tag issue