I have a web application and I have a problem
If the web page does not exist in my application I have got the following error page
HTTP Status 404 - /myapplication/department/home.html
type Status report
message /myapplication/department/home.html
description The requested resource (/myapplication/department/home.html) is not available.
I want to forward user to the index page, if this problem happen , without he knows How to do that
Just specify the index page as 404 default error page in
web.xml.I assume that you are aware that this is bad for user experience and SEO? If it is for example a page which you have (re)moved, then you should rather create a filter which does a 301 redirect to the desired location.