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 are the different methods involved in the process of session management in servlets?

1205


What is a servlet context?

1086


Describe some assignments that are executed by servlet container?

1030


Can we fetch the attributes related to a servlet on a different servlet?

1083


Why the container loads server at the application startup and how?

1010


Explain the features are in servlet 3?

1015


What is Servlets and explain the advantages of Servlet life cycle?

1037


What do you mean by a filter and how does it work?

898


Explain jsessionid and when is it created?

1045


What are the differences between the servletconfig interface and the servletcontext interface?

1111


What's the architecture of a servlet package?

982


What is the difference between using getSession(true) and getSession(false) methods?

988


What is preinitialization of a servlet?

973


what is multiple server?

2257


Explain request dispatcher and its methods.

945