What is the difference between servlet and jsp?

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

    链接地址: http://www.djcxy.com/p/76566.html

    上一篇: Integerate JSF,servlet和JSP

    下一篇: servlet和jsp有什么区别?