> From: Allen Walker [mailto:[EMAIL PROTECTED]]
>
> I am getting a "page not found" when trying to forward inside my servlet.
>
> The code:
>             RequestDispatcher dispatcher =
> getServletContext().getRequestDispatcher("/mktg/employee_form.jsp");
>             req.setAttribute("forward_msg", new String("Form
> Submission Complete"));
>             dispatcher.forward(req,resp);
>
>
> ---
>
> /mkgt is a valid context I've set up. In fact I can directly
> access the page
> at /mkgt/employee_form.jsp
>
> I also tried getting rid of /mkgt and then I just get a null
> pointer exception
> at the dispatcher line.

You can only forward to other URLs in the same context are you are currently
in.

If /mkgt is a different context from the servlet you are trying to forward
from, it won't work.

-Dave

Reply via email to