Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets and JSP

 
Vallabhaneni Suresh Kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which one is faster among servlet and JSP and why?
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
servlet is faster than JSP... Cos JSP is indeed transformed to servlet behind the scene to respond the user's request... Hope it helps...
 
Vallabhaneni Suresh Kumar
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mr.Koko Nalng
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlet is therefore faster in theory than JSP only on the first call, as afterwards it's the compiled code that gets called
In practice, it all depends on the quality of the code generator that turns your JSP into compilable Java code. Some are better than others and will generate more optimised Java.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic