Jsp is nothing but a servlet.jsp is transfered to servlet by jsp engine.after converting it acts like a servlet.in servlets static content and dynamic content are combined.we can avoid this using jsp.we can separate static content from dynamic content.so this makes the application very flexible. Source: CoolInterview.com
Servlet contains very indepth coding to develop any servlet web application.And also all logics are implemented in same servlets we get page centric problem.There is no implicits objects and by default servlet is not a threadsafe.It is not participating session by default.javax.servlet package.
when compare to servlets.... In jsp,Indepth java coding is reduced because of custom tags is used.And Business,Data acess logics are developed in different webpages.It means presentation logics are developed in jsp page and data acess logic developed in JavaBean class.It eliminates pagecentric problem. Jsp have its own implicit objects provided by container.Bydefault its participating in session.It is the subpackage of javax.servlet.jsp package.But both are available in same server. Source: CoolInterview.com
servlet:-1)mainly for business logic. 2)once compled a servlet,if any modifications then once again complie and re-deploy. 3)no implicit objects.
jsp:-1)mainly for presentation logic. 2)want to make changes go to the source jsp file and make changes,not need any recompilation. 3)implicit objects are there.
**** jsp== servlet ****
because,even if u write any jsp file at the back a servlet will be generated. (for example if u r using tomcat as server then in "work directory "of tomcat there u can find the servlet. Source: CoolInterview.com