This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes JSP, Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP, Servlets" Watch "JSP, Servlets" New topic
Author

JSP, Servlets

sameer ranadive
Greenhorn

Joined: Oct 07, 2003
Posts: 5
What r the advantages of servlet over jsp?


thanks & regards<br />sam
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Please post in the Servlets forum.


Groovy
Sainudheen Mydeen
Ranch Hand

Joined: Aug 18, 2003
Posts: 218
Hi
During the 'Page translation phase' of JSP life-cycle, JSPs are parsed and a java file containing the corresponding servlet is created. If you have more diplay logic go with JSP.
------------------
Sainudheen
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Moving to the Servlets Forum.


GenRocket - Experts at Building Test Data
Ramakrishnan thiyagarajan
Ranch Hand

Joined: Oct 07, 2003
Posts: 57
hi,
the main difference is jsp s are precompiled servlet and
jsps are not pure java code.
Tim Baker
Ranch Hand

Joined: Oct 04, 2003
Posts: 541
yes JSPs are HTML mixed with the Java code, Servlets are a java program that outputs HTML code. if most of the HTML is generated by the program and not fixed use servlets. if most of the HTML is static with small dynamic portions use JSP either with or without beans. For in between stuff use JSP with beans or servlets.


Kim Jong II (North Korea's Dear Leader) said:Nuclear weapons don't kill people, people kill people.
 
wood burning stoves
 
subject: JSP, Servlets