Two Laptop Bag
The moose likes Servlets and the fly likes redirect, foreward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "redirect, foreward" Watch "redirect, foreward" New topic

redirect, foreward


Joined: Nov 16, 2001
Posts: 7
can anybody tell me about the differece between dispacher.foreward() and sendRediect().
thanks and regards
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Rafter, use the search facility. This has been discussed several times in this and the JSP forum.


So much trouble in the world -- Bob Marley

Joined: Nov 16, 2001
Posts: 7
hi Bosun,
there is no search button here, how can search. Please explain the difference , don't give this kind of suggesions.
thanks and regards
k swamy

Joined: Jul 31, 2001
Posts: 14
There is a search button near "Post Reply" button...
"Search" for it!!!

Joined: Nov 16, 2001
Posts: 7
Dear Swamy,
thank you for your suggestion , I have searched the site, but I did not the content except my own topic, thanks and regards
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Try spelling forward correctly.

A search for "forward redirect differen" (because inexplicably, there is a textbox size limit, difference is truncated) returns 11 results, a few of which contain an explanation for you.

However, as a shortcut, just keep reading:

sendRedirect actually sends an HTTP response to the browser, ordering it to load a different page. In terms of your application, it would be 'the next page'.

forward works on the server side, and no HTTP response is sent to the browser, unless the resource to which you are forwarding outputs something.

Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9059
Please read and re-register with a name that conforms. We would like you to be able to continue to post here at JavaRanch.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link:
subject: redirect, foreward
It's not a secret anymore!