Which is generally faster at creating dynamic output: A JSP included in a JSP with params or a custom JSP tag with attributes?

Alessandro A. Garbagnati

It's difficoult to find out which one is faster or better for all situations.

I personally use both because there are cases where an include saves me a lot of work. All over my pages I use custom tags, and unless I can't do in other way, I normally avoid inserting Java code inside a JSP page.

The jsp:include could be a good solution in some cases, but you can't use it inside a custom tag, so, if you think this could happen, remember this problem. You will be forced, in that case, to use (the definitely slower) <%@ include file="..." %>.
With custom tag you have a better control of the output. In an iteration, for example, you can decide to cancel or change or do whatever you like to the output in an easier way that with scriplets (where you have to manage this by your own).