As Servlet is java class which having HTML tag and JSP is HTML tags having java sentex. As JSP is mostly used for presentation work by HTML and Servlet is used for defining the logics of the work and web application working.
Be oN edGE SCJP 1.4, on edGE for SCWCD 1.4
You have already received three warning to adjust your display name to adhere to JavaRanch standards. This is not optionla. Adjust your display name to be a first and a last name prior to your next post. Otherwise, your account will be closed.
JSP is Java code embedded in HTML; the Java code is compiled (if necessary) 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.
but both reqiured container on the server, such as Tomcat.
JSP technology extends the basic Servlet framework to enable easier and faster page authoring and maintenance in larger enterprises.
One difference between JSP and SERVLET is first time when we call jsp it will take time to respond , since server has to convert jsp to servlet and execute the component. [ February 13, 2006: Message edited by: krishna yadav ]