Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<error-page> tag issue

 
Lou Pelagalli
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

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
Author and ninkuma
Marshal
Pie
Posts: 65118
89
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic