Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Differences b/w Jsp and Servlet

 
Majid Khan
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anyone list the DIFFERENCES between the two
apart from the fact that Jsp can use static html content
Servlet do not have any user interface content
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP is just a convenient way of generating a servlet, especially if the page you need to generate has a lot of HTML markup that would be inconvenient to generate from lots of print statements in a servlet.
One neat thing in JSP is the custom tag library. If your web pages must be generated by web designers who don't know or want to know any Java, you may be able to set them up with a toolkit of custom tags so they won't have to bother the programmers for every little change.
Bill
<plug>Java Developer's Guide to Servlets and JSP
ISBN 0-7821-2809-2 </plug>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic