File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Are JSP/Servlets like Chicken/Egg dilemma for beggining programmers? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Are JSP/Servlets like Chicken/Egg dilemma for beggining programmers?" Watch "Are JSP/Servlets like Chicken/Egg dilemma for beggining programmers?" New topic
Author

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

Paul Puodziukas
Greenhorn

Joined: Aug 25, 2001
Posts: 16
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

Joined: Nov 12, 2001
Posts: 906
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... :-(


/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Are JSP/Servlets like Chicken/Egg dilemma for beggining programmers?