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 the difference between Servlet and JSP?Advantage of
JSP over Servelt?Any concept present in JSP which we cant
implement in Servlet?

Answer Posted / farhaananwar

JSP is the extension of HttpServlet instance. JSP is
basically used for presentation and servlet is used for
bussiness logic although you use servlet for presentation
after all JSP page also boil down to jsp servlet but
presentation with servlet is realy labours and boring.
Servlet are free from Http protocol you can use
GenericServlet class as base class of your custom servlet
class to perform communication with client either in http
protocal and others but with JSP page your are married only
to HTTP protocol. JSP page provides you with set of implicit
objects that are page, request, response, session,
pageContext, config, out, application, exception (only for
error page) whereas you do not find them in servlet at your
disposal. With help of servlet you can not only use jstl
tags but also design your own custom tags which can be
classic tags, simple tag and tag file. this help you to keep
away java code from JSP page presentaion. tags are like
function call where rest of bussiness logic kept away from
main flow program this helps to keep thing unclutterd and
encouraged reusablity. use of bean with standard action and
tags are easier than the use of bean in servlet.
EL expression, EL function, tags are some new concepts
that can not be used in servlet as it is but need some hard-
coding in java lang to achieve the same.

Is This Answer Correct ?    92 Yes 26 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the path of servlet in the server?

1047


Elucidate servlet attributes and its scope?

1078


What is the requirement of servlet config and servlet context implemented and how are they implemented?

1052


What is servlet mapping?

1079


Which event is fired at the time of project deployment and undeployment?

1369


What mechanisms are used by a Servlet Container to maintain session information?

1218


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

1058


Differentiate between the get and post method

1123


How the typical servlet code look like ?

1321


What is cookie? Why is cookie used?

1104


What must be implemented by all servlets?

1158


What are the advantages of Servlet over CGI?

1204


What is the purpose of dispatcherservlet properties?

1194


What is the directory structure of web application?

1045


What is servlet and its types?

1103