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 servlet?

1089


What are the life-cycle methods for a servlet?

997


What is meant by session? Tell me something about httpsession class?

1029


What is servlet lazy loading?

1165


Describe some assignments that are executed by servlet container?

1077


How can you use a servlet to generate a plain text instead of html?

1128


How to get the server information in a servlet?

1168


What's the difference between authentication and authorization?

1144


Why jsp is better than servlet?

1029


Explain servlet life cycle?

1129


What are the types of Session Tracking ?

1149


Explain the difference between servletconfig and servletcontext in servlet?

1036


What is pure servlet?

1206


What are common tasks performed by Servlet Container?

1258


Difference between forward() method and sendredirect() method ?

1034