February 10, 2009 at 7:23 AM
There are two methods in which one can navigate from one page to another page, a page can be a servlet or jsp
1. Using sendRedirect() method of request object
2. Using forward() method of RequestDispatcher. RequestDispatcher can be created either from ServletContext or ServletRequest.
If you want to navigate within the context, get the RequestDispatcher object from ServletRequest. If you want to navigate to a page in a different context, get the RequestDispatcher object from ServletContext.
February 10, 2009 at 7:24 AM
Sorry, sendRedirect() method is available in response object