I like to do that if my application will receive an error like 400 ( page not found ) then it will not show the error page provided by tomcat , i want that if that type of error comes then my error page will come.
In web.xml i have used-: <web-app> <error-page> <error-code>500</error-code> <location>/file_not_found.html</location> </error-page> <error-page> <error-code>404</error-code> <location>/file_not_found.html</location> </error-page> </web-app>
But after that it is not forwarding to my page. Please rectify me.
Is this all there is to your web.xml? If not, you need to make sure that you've got the error-code section defined in the correct place (which depends on the file version you're using, but who would know because you didn't specify it in your web-app tag....)
Other than that, the error-code section you've posted is fine, given that there is a file_not_found.html file in the root directory of your webapp. Here is my error-code section to my web.xml and it works exactly as expected: