Chapter 17. Tuning Servlets and JSPs

Most J2EE applications are built around servlets and JSPs. The two types of performance considerations for servlets and JSPs are efficient use of J2SE code (Strings, I/O, etc.) and optimizing servlet container-related resources, including the resources provided as part of the Servlet API.

Since JSPs are compiled into servlets, there is usually little difference in performance between them. However, explicitly coding servlets can result in faster applications than JSPs because you have much more control over the fine details of the servlet. This is one of the standard performance tradeoffs: using JSPs results in a better design (separating presentation and logic), but servlets can be tweaked to go faster.