• Post Reply Bookmark Topic Watch Topic
  • New Topic

problem using error-page tag

 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using the following error page tag in my web.xml.

<error-page>
<error-code>404</error-code>
<location>/PageNotFound.jsp</location>
</error-page>

I try to call a page which does not exist. i get the following output HTTP 404 - File not found, but the container does not redirect the control to PageNotFound.jsp as has been configured in web.xml. Is there something else i need to add to web.xml.

thnx in advance
 
David Abramowicz
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do a search on your problem in this forum...

Basically I'm guessing your using IE, which has like a "use friendly error pages" setting. If that switch is flicked, you wont see the custom error page.

Cheers /Dave
 
Naresh Chaurasia
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dave,
I disabled the option in browser and it is working fine. Thanks a lot.

N C
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!