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
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 | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
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
Peter den Haan | peterdenhaan.com | quantum computing specialist, Objectivity Ltd
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.