Hello,
I would like to handle 404 errors, only when dispatching a HttpRequest from a particular (and only that) servlet to a different servlet.
So if a forward fails from the servlet /testServlet, only then I want the error to be handled by that or some other servlet.
I know that I can define an error page in the applications web.xml descriptor which will handle ALL 404s.
Here an overview
ServletName -> Resource (html, jsp or other) -> result
/testServelt -> /doesnot/exist.jsp -> /testServlet handles the 404 error or some other servlet
/anyOtherServlet -> /doesnot/exist.jsp -> No error page gets call. The default application server handling gets applied.
/does/notexist.jsp -> /doesnot/exit.jsp -> If this page gets called directly, again no error page gets call. The default application server handling applies.
Fritz