Reputation: 2800
Unable to redirect 404 error code to a particular resource. My configuration in web.xml as follows.
<error-page>
<error-code>404</error-code>
<location>/FourNotFour.jsp</location>
</error-page>
Please help suggest me in this regard. Thanks in advance.
Upvotes: 3
Views: 982
Reputation: 471
Your page should be located in your application and make sure that the FourNotFour.jsp must not have any error. Also check your log file it will help you.
Upvotes: 1
Reputation: 15446
The configuration looks correct. You can check the existance and location of the /FourNotFour.jsp
. It should exist immediately inside the context root directory.
Context-Dir
- FourNotFour.jsp
- WEB-INF
- web.xml
- lib
- classes
Upvotes: 1
Reputation: 94643
Please check the location of page. The page FourNotFour.jsp
must be located at root of you web-app (out side the WEB-INF).
Upvotes: 1