• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

<error-page> tag issue

 
Ranch Hand
Posts: 150
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

 
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried observing the behavior in other browsers?
 
Lou Pelagalli
Ranch Hand
Posts: 150
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 150
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, that's kinda what I was leading to when asking about other browsers.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!