This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
Kaustubh. Mumbai, India.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com