aspose file tools*
The moose likes Servlets and the fly likes send redirect method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "send redirect method" Watch "send redirect method" New topic
Author

send redirect method

praveen kumar gowda
Greenhorn

Joined: Feb 20, 2012
Posts: 23
hello..every one..this is my first...doubts that i am putting here..please do help..

difference between send redirect and forward()...

in which case we can see the help of send redirect()....

so far what i understood about send redirect is, it sends a header back to the client/browser. this header then contains the resource(page/servlet) which you wanted to be redirected.

i want to kw what user might requested ...what the send redirect saying...please help me out for this confusion...
Joemon Anthony
Greenhorn

Joined: May 22, 2011
Posts: 23

Please go through this url click here


(SCJP 5, OCA 9i)
(Always interested in learning)
Pete Nelson
Ranch Hand

Joined: Aug 30, 2010
Posts: 147

A redirect is part of the HTTP spec, and takes place at the client. Basically, the server sends a "Location: http://some.url/somewhere", and the browser should follow that new URL.

A "forward" or "include" is internal to your servlet environment, and basically allows one program unit (JSP, Servlet) to forward to or include another before sending the final output to the browser.


OCPJP
In preparing for battle I have always found that plans are useless, but planning is indispensable. -- Dwight D. Eisenhower
Rajesh Khan
Ranch Hand

Joined: Oct 16, 2011
Posts: 230
sendredirect taks place at the client side whereas forward takes place at the server side.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: send redirect method
 
Similar Threads
why we need send redirect?
apache authentication with tomcat
Servlet Forward
How to Use REFERER HTTP header
What happens to the referrer in the header after Response.sendRedirect is called