I am running a
servlet LoginServlet that calls another servlet, AccountServlet.
Tomcat is unable to find the called servlet: AccountServlet when I call it from within LoginServlet. AccountServlet runs properly when I run it from the address bar, but as soon as I attempt to obtain a RequestDispatcher object using AccountServlet I get the unable to find Account Servlet error. Here is the code that is giving me problems:
ServletContext ct = getServletContext();
RequestDispatcher rd = ct.getRequestDispatcher("/servlet/AccountServlet");
rd.forward( req, res );
Everything else is fine but I cant seem to get AccountServlet running. Should I specify a more specific path in my getRequestDispatcher method call?