• 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

Advantages of servlets over JSP?

 
Ranch Hand
Posts: 89
Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I wanted to know that what are the advantages of servlets over jsp? and where should we use servlets specifically?

thanks..
Nidhi
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Search this and the JSP forums (Google too) with keywords like "MVC" and "Architecture" and you will find lots of discussions comparing the two.
[ January 13, 2005: Message edited by: Ben Souther ]
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) Servlet are need not to be compiler by webcontainer as jsp have to be compiled and convert in to jsp
2) Support all types of protocols while jsp support only http protocol
3) Servlet is faster than Jsp
4) Servlet is written in Java can take the advantage of all java facility like JDBC, RMI, JNDI
 
Saloon Keeper
Posts: 7585
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Shikha Pandey wrote:1) Servlet are need not to be compiler by webcontainer as jsp have to be compiled and convert in to jsp
2) Support all types of protocols while jsp support only http protocol
3) Servlet is faster than Jsp
4) Servlet is written in Java can take the advantage of all java facility like JDBC, RMI, JNDI


Welcome to the Ranch.

I'm afraid most of this is at least partially incorrect, and some is entirely incorrect. But after 16 years, Nidhi is probably no longer waiting for an answer :-)
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For people coming here for an answer to the older question: it's never a question of servlets or JSP, the correct answer is servlets and JSP -- they're meant to go hand-in-hand.

See this article for an explanation of how servlets and JSP are used in concert to properly structure a Java web application.
reply
    Bookmark Topic Watch Topic
  • New Topic