When u foward to a jsp,u use RequestDispatcher rd=request.getRequestDispatcher("myWebApp/myJSP.jsp");,so it is the same rule when u foward to a servelt by RequestDispatcher rd=request.getRequestDispatcher("myWebapp/myServlet");
Yeah! what you said is right.But you need to do little change with this.While mentioning out servletalias name you need to give the root directory as "/MyServlet".Also before using Requestdispatcher, be sure that you get the corresponding servletcontext of particular web application(i.e., within the web server where it is used to store servlets).
You can use RequestDispatcher with servlets too, or any other resource for that matter. The arguement you pass to the getRequestDispatcher method is the path to whatever resource you want to use. [ April 13, 2005: Message edited by: Paul Bourdeaux ]
“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook