include (directive x action)

I learned that <%@ include file="file" %> and "<jsp:include page="file" /> behaved differently in the sense that the first includes the source of the target page at translation/compile time and the second performs a request and includes the result in runtime.

So I tried to test this in practice and the results did not confirm expectations. First I created a simple jsp file to print the time. Then I created another jsp including the first one twice, like this:

That is going to execute at run-time regardless of whether the statement was included in the JSP via directive or action. The difference is in when the included file is translated, not when it is executed.

Right, as Ben and I pointed out. That code will get translated at different times (and in different places) depending upon whether you use the include directive or action, but it still executes when the page is accessed.