Friday 5 April 2013

Difference between forward and sendRedirect


S No.
Forward
sendRedirect
1
Control can be transferred resources available on the same server.
Control can be redirect to defferent server.
2
Request/Response objects  transferred with forward
New Request/Response objects are created.  
3
Session is not lost
Session is not lost.
4
This is done by the container
This is done by the browser
5
URL is not changed
New URL is generated
6
This  is faster than sendRedirect
This is slower than Faster

No comments:

Post a Comment