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

What are the two important api's in for servlets?

1024


What is the difference between forward () and sendredirect () functions in servlet? Explain

995


Explain load on start-up and its importance?

1084


What is servlet interface?

1172


When Servlet is unloaded?

1058


Why do we have servlet listeners?

1031


what is servlet chaining?

1048


What is lazy loading and what is Generic Servlet Class?

1037


What is session?

1009


List out the difference between ServletConfig and ServletContext?

998


Explain the servlet filter.

937


How to get the path of servlet in the server?

958


What is meant by a servlet?

1055


How do you configure a centralized error handler in servlets?

1050


Explain the custom jsp tags and the beans.

1017