• 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

Why is Jsp faster than Servlets..??

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
Could someone tell me why is jsp faster than a
servlet..for eg: when displaying an image ..
i can see the speed ,but why is it so..
the servlet is also compiled only once,right??
Plz clear it to me in a proper way..
Thanks
 
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by rejieve alexander:
Could someone tell me why is jsp faster than a
servlet..


It isn't.
Since a JSP compiles to a servlet, it cannot be inherently faster, full stop. If your JSP is any faster than a similar servlet, there presumably is a difference in the coding techniques used.
- Peter
 
Peter den Haan
author
Posts: 3252
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

If your JSP is any faster than a similar servlet, there presumably is a difference in the coding techniques used.


Or, I should add, in the compiler. You might be using javac in your development environment and jikes in your server.
Whether that could give you any appreciable run-time performance difference, I don't know.
- Peter
 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
jsp cannot be faster than a servlet...infact if the initial instantiation/loading of both are taken as a comparision then the servlet is faster than the jsp b'coz the jsp takes some more time in converting itself to the servlet the first time it is invoked befor the webserver loads the servlet and compiles it.

sagar
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic