Version Servlet 2.3 and on
//this is if you are invoking another servlet
//if same web application
String otherServletPath = "otherServlet";
RequestDispatcher mydisp = cx.getRequestDispatcher(
otherServletPath);
//Now you can add any elements you want to
//the current request (req) object and invoke
the
//servlet
mydisp.forward(req,res);
//now controll returned to this servlet |