• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlets V.S. JSP

 
Maggie Ling
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,

I would like to know what the difference is between Java Servlets and JSP? Since JSP gets compiled into a Servlet, why don't we just write a servlet to begin with? Why do you prefer JSP over Servlets? Thank you.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This gets asked a lot (a real lot) here.

Try searching both this and the JSP forum with keywords "Servlet", "JSP", "difference".
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65518
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick mind exercise: you have a big complicated page with lots of HTML markup, JavaScript and Ajax calls, CSS style declarations, and other markup.

Do you want to build up and maintain all that in Java strings?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!