Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
Shashank Hiwarkar<br />SCJP, SCWCD
Shashank Hiwarkar wrote:Hello Mathew,
JSP has the advantage of seperating the presentation layer and business logic, and hence convinient at development.
First time when JSP engine encounter JSP request, it convert JSP in servlet, compile it and the bytecode format it saves in JSP Container along with the time stamp.
Due to this process the first time response of JSP as compaired to servlets is slower, much slower.
But from next request onword JSP engine checks the time stamp of the request and of JSP compiled file in JSP Container in JVM, and if the file is not changed then it redirects this request to that class file. And client get the response.
In case of servlet the compiled servlet, ie class files are stored in Servlet Container in JVM.
As both servlet and JSP is handled with same processes and sharing the resourses (JVM), there is no difference in performance of both.
IF anybody can throw more light on this, then please..
Nam Ha Minh wrote:Servlet is compiled once, whereas JSP may be re-compiled at runtime, so JSP maybe slower than servlet.