top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What’s the difference between sendRedirect and forward methods ?

+3 votes
378 views
What’s the difference between sendRedirect and forward methods ?
posted Feb 25, 2015 by Dominic

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

The sendRedirect method creates a new request, while the forward method just forwards a request to a new target. The previous request scope objects are not available after a redirect, because it results in a new request. On the other hand, the previous request scope objects are available after forwarding. FInally, in general, the sendRedirect method is considered to be slower compare to the forward method.

answer Feb 26, 2015 by Karthick.c
...