Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the difference between sendRedirect() and forward()?
in what situations do we have to use send redirect()
instead of forward().

Answer Posted / vikram raj bakshi

I'll explain this with an example. If suppose u ask ur
servant(who is uneducated), to go to the market and get u a
Pepsodent.Now if the shopkeeper is not having a pepsodent
he will simply hand over Close Up to the servant.This
scenario is something simialr to the "forward" method. If
the requested resource is not available u will be
redirected to a different page whose url is specifiedd in
the forward method call. But u wont be able to see the
cnage in the url in the address bar. It's all done
internaly. In case os sendRedirect, its just like ur call
is moving from one page to another and u will able to see
the cnage in the url too. Its like normal page navigation.
Hope you would have a got a picture of it.

Is This Answer Correct ?    25 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is application configuration resource file?

913


What are different modules in spring?

936


What are the most important topics in java?

946


Why primitive data types in java are not objects?

885


What is document?

1008


What are the types of j2ee clients?

966


What does web module contain?

903


what is interface in java ?can you explain with simple example?and what is the difference between abstract and interface?

2499


Is java is fully object oriented?

944


What is java ee architecture?

887


Why java is interpreted language?

851


What are types of j2ee clients?

946


What is conversational state?

964


Can I run seam in a j2ee environment?

965


What does enterprise javabeans module contain?

917