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...

Difference between Include, Forward and sendRedirect in
Servlet?

Answer Posted / samit katiyar

forward() should be called before the response has been
committed to the client (before response body output has
been flushed). If the response already has been committed,
this method throws an IllegalStateException. Uncommitted
output in the response buffer is automatically cleared
before the forward.

While with include()...... The request and response
parameters must be either the same objects as were passed
to the calling servlet's service method or be subclasses of
the ServletRequestWrapper or ServletResponseWrapper classes
that wrap them.

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better jsp or servlet?

977


What is the directory structure of web application?

924


What is generic servlet class?

1010


How can the referrer and the target urls be used in servlet?

948


Why is a constructor needed in a servlet even if we use the init method?

1091


How would you create deadlock on your servlet?

1103


What are the functions of an intercepting filter?

885


How can we refresh automatically when new data has entered the database?

1052


Whether we can get deadlock situation in servlets?

1010


What are the steps that are required to handle the multi-threading?

1045


What is the effective way to make sure all the servlets are accessible only when user has a valid session?

1005


Write a command to get actual path of a servlet to the server?

969


Can you send an authentication error from a servlet?

925


What is the difference between Server and Container?

1180


What is servlet container. how it works?

1088