Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

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

 
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).]
 
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... :-(
 
Saloon Keeper
Posts: 21944
149
Android Eclipse IDE Tomcat Server Redhat Java 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.
 
Water! People swim in water! Even tiny ads swim in water:
ScroogeXHTML 8.7 - RTF to HTML5 and XHTML converter
https://coderanch.com/t/730700/ScroogeXHTML-RTF-HTML-XHTML-converter
    Bookmark Topic Watch Topic
  • New Topic