• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).]
 
Ranch Hand
Posts: 906
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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... :-(
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic