• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Are JSP/Servlets like Chicken/Egg dilemma for beggining programmers?

 
Paul Puodziukas
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I always hear Servlets and JSP's being used together in the same sentence. Are they mutually exclusive technologies that just happen to work well together? Which should a novice java/xhtml programmer learn first? Is it best to learn both at the same time?
Paul
[This message has been edited by Paul Puodziukas (edited November 12, 2001).]
[This message has been edited by Paul Puodziukas (edited November 12, 2001).]
[This message has been edited by Paul Puodziukas (edited November 12, 2001).]
 
JeanLouis Marechaux
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Paul,
The first thing you have to know is that jsp IS Servlet.
The first time a jsp page is used, it is "compiled" by the jsp engine to obtain.... a servlet.
Now let's try to answer your question.
If you are a programmer only interested in Client presentation, HTML,XML, the learn only the JSP. It is quite simple to undersatnd with a html background.
But if you need to become a J2EE programmer, using MVC architecture, mainly interested in Server-side development then you have to fully understand what a JSP is.
Thus, learn the Servlet API first. Jsp is just a simplified stuff of the Servlet API.
Hope this is note to confused... :-(
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or, jou may just prefer to consider each to be the other turned "inside out" - Servlets are Java code that you have to use print statements to output the HTML, where JSPs are "HTML" that you have to escape to code Java.
Which you use depends on whether you're mostly doing logic or display. The MVC/Model 2 architecture encourages you to use both and minimize the use of their respective "escape" mechanisms.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic