Possible Duplicate:
What is the difference between JSF, Servlet and JSP?
What is the Exact difference between the Servlet And JSP
A JSP is a special kind of Servlet that is edited in a HTML-like syntax and compiled into Servlet byte code by a web container (usually at deploy-time or when first accessed).
JSPs can contain complex Java code, however that has been considered a bad practice for the last 8 years or so, so JSPs will usually only contain
(Judging by the age of the above links you can tell that JSP is not exactly cutting-edge anymore)
JSP is a template language that the servlet/JSP engine compiles into a servlet, which is then compiled into Java byte code and executed.
Think of JSP as a convenient HTML factory.
Simply, Servlet is Java code that outputs HTML. JSP is the opposite, it's HTML that has Java code inside tags.