If I were to do it...I would test it by including it about a hundred times (seperately) in a JSP. For this test JSP, first print the time, then add the hundred includes, then print the time. Unfortunately, includeing HTML fails in the Tomcat 4.0*. We had a discussion on this issue in the SCWCD forum. I haven't tried it since. regds. - madhav
It would seem to me Gabriel that the include for the jsp has to be more expensive as the jsp needs to be compiled into a servlet and then after that needs to be included while as the html can be included as a static text file...... I hope that makes sense..... Sahil
Joined: Oct 17, 2001
The performance hit of doing the include is only incurred once though, for either of those.
Yes, the included jsp would need to be compiled, and then included, whereas the HTML would merely be included. But for both of the files, this only happens once.
If you were to use the <%@ include page="foo.*" %> syntax, then this would be included every time the page is called, and is thus more performance intensive. Additionaly, the jsp is recompiled each time it's included. So using <%@ would make any performance hit attributable to the jsp much more obvious.