I want to create a filter in my app such that before each request, it detects whether the requested page exists. If it doesn't exist, it will forward the user to an error page.
How do I detect that the page exists?
I need a solution with a filter and not using the web.xml tag method.