Forward Call from a Servlet

This example shows how to forward a http call from a servlet to another page in the same web application.
To do a forward we need to get an instance of RequestDispatcher by calling the getRequestDispatcher() method on the HttpServletRequest object.
The page to which the call will be forwarded is sent to the method as parameter. Finally the forward() method of the RequestDispatcher is called with both the request and response objects as parameters.

Search for more Java info on this site here:
Custom Search

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">