• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP, Servlets

 
sameer ranadive
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What r the advantages of servlet over jsp?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please post in the Servlets forum.
 
Sainudheen Mydeen
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving to the Servlets Forum.
 
Ramakrishnan thiyagarajan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
the main difference is jsp s are precompiled servlet and
jsps are not pure java code.
 
Tim Baker
Ranch Hand
Posts: 541
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic