include method
Should I use the include action or directive to get the best performance. I recieve a lot of pageviews, and I have read that <%@ include file="" %>
uses more memory and <jsp:include page="" /> takes longer to run. Which has the greatest performance impact on a large system (performance, not compatability is the biggest issue)
[353 byte] By [
ubncoa] at [2007-11-26 15:01:00]

# 1
From here: http://www-128.ibm.com/developerworks/java/library/j-jsp04293.html
<%@ include file="" %> , only works with static content.
The include directive also caches the included files, this means the page will load faster when it gets cached in the browser.
However, with the include directive you are only restricted to static files, if you want to include the results of dynamic JSPs you don't have a choice but to use jsp:include.
Better than jsp:include, is c:import tag (found in JSP Tag Libraries JSTL)
But I don't know which one is faster performance wise jsp:include or c:import. If you have a performance testing tool then you can test it yourself.
Feature wise c:import is better than jsp:include.
Message was edited by:
appy77