• 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

difference bet servelet and jsp

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hai, can any one clarify what is the exact difference between servelet and jsp.
 
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is not much difference between JSPs and Servlets
We use JSPs for the presentation. We can embed HTML and also Javascript in JSP pages. And its quite difficult to present through Servlet. You will have to use a lot of out.print() commands in it.
JSPs ultimately converted into the servlets when we run the application.
Whereas Servlets are mostly used as a controller. (See MVC Pattern) For logic and not for presentation
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The differences are
1) In Jsp, content generation and content presentation are easily separable..so readablity is easy But in Servlet..we need to embed the Html in java code which is difficult to understand.
2) Jsp gives Http protocol specific functionality only.But servlet may provide Protocol independent functionality that is , servlet may be a http servlet or generic servlet
3) Jsp is an extension of servlet.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic