0 Replies Latest reply on May 23, 2005 10:23 AM by Toni Beckman

    "error page" for only a particular servlet

    Toni Beckman Novice

      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