Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

difference between JSP & Servlet  RSS feed

 
Jeremy Parsons
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am studying "Sams Teach Yourself JavaServer Pages 2.0"..

So far I have tried the simple "hello world" saved in .jsp, and when I try it in my browser, nothing displayed.. Here is the code I have tried..

now I am very familiar with HTML, and obviously I can do this with HTML, but I want to do everything with the .jsp to get the hang of JSP..

Now with the servlet part of my question, what is the difference as in benefit over the .jsp extension.. I know there is the more coding for a servlet, but I just want to get JSP down pat, so I can create dynamic pages.. Any pointers, tips, etc would be greatly appreciated...
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65826
134
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP is a server-side templating technology based on servlet technology. With JSPs you can easily create dynamic HTML pages as your views using simple markup.

Despite some inexplicably popular misconeptions, JSP and servlets are not competing technologies. Rather, they compliement each other rather well and if you are serious about writing web apps you will need to learn both.

This article might be helpful in wrapping your head around just what JSP is and isn't.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!