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.
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.
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
精彩评论