What is the difference between JSP and Servlet?

Answer Posted / satyabrata

Both servlet and jsp are web components. But servlet is
best suited for request processing, handling the business
logic while jsp is suitable for content generating .Its
easy to include html tag in jsp rather than servlet.Also
jsp is compiled to servlet when first loaded to
webserver.So in many framework servlet act as a controller
while jsp as a view.Also implicit object and action
elements available in jsp but not in servlet.

Is This Answer Correct ?    103 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give uses of object cloning?

554


How can we disable java code or scripting in jsp page?

513


What are the different scope values for the tag?

482


What is the use of requestdispatcher?

528


How do I use a scriptlet to initialize a newly instantiated bean?

552






What is expression language injection?

506


What is include directive in jsp?

504


How to delete a cookie in a jsp?

517


What is jsp servlet?

498


What is the _jspservice() method?

509


Differentiate between pagecontext.include and jsp:include?

530


What is error page in jsp?

491


What is difference between sendredirect and requestdispatcher?

492


Is jsp a front end?

555


What is a jsp container?

496