Hi, You cannot use the forward method of RequestDispatcher interface. A forward method allows you to redirect only to a resource in the same Web application. The sendRedirect method, on the other hand, allows you to redirect to any URL.
Servlet in different applications within same virtual host can call each other. ServletContext context = getServletContext('context-root-name'); context.getRequestDispatcher('uri-of-servlet-to-be-called').forward(request,response); If applications are in different host, one has to use URL connection or sendRedirect ?
I think using a sendRedirect() would be a solution. forward() may have problems because redirecting to the different resource takes place on the server side in this case where as in the case of sendRedirect() a browser is made to generate a new request to the resource (which could be anything - maybe on a different server). Pl. correct me if i am wrong or have missed anything. -Kaustubh.