How to generate dynamic JSP include ?

You can't generate JSP code programmatically, for example given String "<% include file="template.jsp" %>", and use it directly in the JSP. In our case, this code won't include template.jsp, but only prints the generated String.

Because ? As we can read in taglib quickstart, "The output generated from the JSP of a body tag is treated as plain HTML. That is, the output is not further interpreted as JSP.".