JSP is Java code embedded in HTML; the Java code is compiled and run by the container on the server and the client only sees the results of that code's execution mixed in appropriately with the html.
Servlets are compiled pure Java class files (not mixed with HTML) that get posts from the client and send html to in return.
Servlet is used to exceute on the webbased,which is used to seperate the Dynamic and static Content.It acts as a Controller in MVC. JSP is a Presentation Layer.Which has the Dynamic Html it embedded with java code.Its use to mix both Dynamic and Static content
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.
Visit for more information.http://www.roseindia.net/jsp/http://www.roseindia.net/servlets/