Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp forward or response.sendReedirect()

 
hassan mahmood
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanna know which option is better to use forwarding or redirecting, i know the difference between these two so..., how can a normal web user disable client side redirecting that may result in not properly working of response.sendredirect.

Hassan Mahmood
SCJP2, SCWCD(in process)
 
Zulfikar Dharmawan
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it because of forwarding is being done at the server side without the client being aware of it, while redirecting is at the client side?
 
Alexandre Cervieri
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since response.sendRedirect goes to the client before reach the final destination, forwarding without this additional communication overhead with the client may be better in most of cases. Don't you think?
 
Sergey Tyulkin
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using forward approach we can encounter different problems, such as double submit, "Do you realy wanted to send POSTed data" refreshes, and so on.
 
Pat Dennis
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use response.sendRedirect and this goes back to the client before being redirected, can the client choose to ignore this redirect?
 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Possibly, when we see the redirect happening, one could essentially, press STOP and stop the page from rendering, but it is not like full control.

It happens automatically.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic