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 difference between Forward() and sendRedirect()
methode?

Answer Posted / shakir khan

The RequestDispatcher forward and include methods are
internal to a servlet container and does not affect the
public url of the webresource.

forward() are excute on the server side.

when a forward() is invoked,the request is sent to another
resource on the server without the client being inform that
a different resource is going to process the request.This
occurs completely with in the webcontainer.

sendRedirect() excutes on the client side.

When a sendRedirect()is invoked,it causes the webcontainer
return to the browser,indicating that a new url should be
requested because the browser issues a completely new
request,any object that are stored as request attributes
before the redirect occurs will be lost.
This extra round trip,a redirect is slower than forward.

Is This Answer Correct ?    45 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the dispatcher servlet?

1028


Differentiate between the web server and application server?

1102


What is called servlet mapping?

1149


How a servlet is unloaded?

1133


Is servlet a framework?

1090


What is a servlet context object?

1188


Why is init() method is used in servlets?

1076


What is session tracking?

1263


Why is servlet used?

1223


What is the difference between CGI and Servlet?

1125


List the Different types of servlet?

1090


What is api in servlet?

1071


Can you send an authentication error from a servlet?

1023


What are the different methods of session management in servlets?

1074


What is cookie? Why is cookie used?

1101