Bookmark Topic Watch Topic
  • New Topic

Difference in Servlet and JSP?

 
ron patil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Report post to moderator
Difference in Servlet and JSP?
 
K. Tsang
Bartender
Posts: 3604
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
Welcome to the Ranch.

Simple answer: JSP is a servlet.

Longer answer: The web container translates your JSP into java source and compiles to a servlet. Every tag in the JSP basically corresponds to a section of the servlet/java code.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65516
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
WHile that is technically correct, it's rather an irrelevant implementation detail.

What it comes down to is that servlet is a Java class that serves as a unit of control, while a JSP is text template that serves as a view.

Please SearchFirst, this question has been asked many times.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!