views:

121

answers:

2

Possible Duplicates:
What is the difference between JSF, Servlet and JSP?
JSP Servlet and Web Programming

When it comes to the open-source Java Platform, Enterprise Edition (Java EE) application server, how would you characterize the difference between:

  • JSP
  • Servlet

While both are able to generate dynamic Web content, I am unsure about how they differ and/or how on pertain to the other.

A: 

I suggest you to read this DevX article discussing Servlet and JSP. If you want to know still some more... Go for this and this Wiki

venJava
+2  A: 

JSP is Java Servlet Pages and usually used in rendering HTML/XHTML pages. To me, it's a PHP clone. JSPes will be translated and compiled to Servlet classes eventually.

Servlet on the other hand is a class conforming to the Servlet API, to process HTTP requests, such as GET, POST, etc.

You can read more about Servlet API and its documentation here.

yclian
a JSP page is a servlet
Jean-Philippe Caruana