• Post Reply Bookmark Topic Watch Topic
  • New Topic

reg. sendRedirect  RSS feed

 
Pardhu Sitha
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tell me the Diff. between <jsp:forward> and sendRedirect
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sendRedirect() method allows you to redirect the request to any other resourse which is outside of the current web application.The redirection is made by the client.SendRedirect is a new request so you can't access the current request and response objects there.Since it is a fresh request the request and response objects available are NEW.

The jsp forward action can forward the request to another web application component where you can access the current request and response objects and access all the parameters.


Thanks.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Vinod NS",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65833
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Vinod NS:
sendRedirect() method allows you to redirect the request to any other resourse which is outside of the current web application.


This makes it sounds as if resources within the current web app cannot be targetted by a redirect and that is not the case.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!