Meaningless Drivel is fun!*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jsp forward  or response.sendReedirect() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jsp forward  or response.sendReedirect()" Watch "jsp forward  or response.sendReedirect()" New topic
Author

jsp forward or response.sendReedirect()

hassan mahmood
Greenhorn

Joined: Jan 15, 2003
Posts: 17
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

Joined: Feb 01, 2002
Posts: 74
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?


Zulfikar Dharmawan
SCJP1.4, ICS DB2, ICD Websphere
Alexandre Cervieri
Greenhorn

Joined: Aug 02, 2005
Posts: 27
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

Joined: May 10, 2005
Posts: 87
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

Joined: Apr 19, 2005
Posts: 12
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

Joined: May 12, 2004
Posts: 167
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp forward or response.sendReedirect()