• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is the difference between forward and sendredirect

 
Murthy Cherukumilli
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference between forward and sendredirect?
 
Shankar Narayana
Ranch Hand
Posts: 134
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

In brief, forward sends along the request parameters to the new page, whereas sendRedirect doesn't.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The important point is that sendRedirect finished the request by sending back a redirect response with a new URL. It is up to the client to interpret that redirect and start a new request.

A forward on the other hand continues processing the request, but by a different servlet or other resource.
Bill
 
Murthy Cherukumilli
Ranch Hand
Posts: 45
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks you for your input.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic