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

how many jsp scripting elements are there and what are those?

1066


Define context initialization parameters.

1094


What is servlet collaboration?

1191


Which exception is thrown if the servlet is not initialized properly?

1090


What are the supporting protocol by HttpServlet ?

1256


Can we use threads in Servlets?

1192


Explain jsessionid and when is it created?

1190


What is servlet attributes and their scope?

1103


What are the differences between servlet context vs servlet config?

1144


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

1137


What do you mean by cgi in servlet?

1129


What is the process to implement doget and dopost methods?

1032


What is the difference between a generic servlet and http servlet?

1044


When a servlet accepts a call from a client, it receives two objects. What are they?

1304


Can you send an authentication error from a servlet?

1028