What is key diffrence between using a <jsp:forward> and HttpServletResponse.sendRedirect()?


The <jsp:forward> action allows the request to be forwarded to another resource (servlet/jsp/HTMl> which are available in the same web-application (context).
Where as in the case of Response.sendRedirect() the request to be forwarded/redirected to another resource in the same web-application or some other web-application in the same server, or to a resource on some other web-server. The key difference is by using <jsp:forward> single request from a browser can process multiple resources. Where as by using SendRedirect() multiple requests take place in order to process multiple resources.

One thought on “What is key diffrence between using a <jsp:forward> and HttpServletResponse.sendRedirect()?

  1. SEOcontestAtIIITHyderabad February 6, 2013 / 3:04 am

    Good day very cool blog!! Man .. Excellent ..
    Superb .. I will bookmark your website and take the
    feeds also? I’m happy to seek out numerous helpful information right here within the submit, we need work out extra techniques in this regard, thanks for sharing. . . . . .

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.