Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP and servlet

 
aakash bhatt
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between JSp and servlet.
Is there any life cyle difference.
 
David Hibbs
Ranch Hand
Posts: 374
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP is basically the source code for a servlet. The server simply provides you with certain shortcuts. For example, without the special tags (scriptlets, taglibs, directives, etc), the content is simply assumed to be sent to the response. The difference is that the server will compile your JSP into a .class file for you at execution time (if it has been changed or has not been previously compiled). From then on, it is treated the same as a servlet.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65220
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
aakash, perform a search on this subject in this forum and the Servlets forum and you will find more information on this as it has been discussed many times before.
hth,
bear
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic