Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes problem using error-page tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "problem using error-page tag" Watch "problem using error-page tag" New topic
Author

problem using error-page tag

Naresh Chaurasia
Ranch Hand

Joined: May 18, 2005
Posts: 356
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


SCJP 1.4, SCWCD1.4, OCA(1Z0-007)
David Abramowicz
Ranch Hand

Joined: Dec 10, 2004
Posts: 56
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

Joined: May 18, 2005
Posts: 356
Hi Dave,
I disabled the option in browser and it is working fine. Thanks a lot.

N C
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem using error-page tag
 
Similar Threads
Handling 404 Error
How to configure custom error pages in jboss-5.1.0?
redirect if error 404 comes
getting error code in pagenotfound.jsp
Please Help - Using JSF