JSP Include Me

Sometime back I wrote Import Script, Import CSS, Import PHP where I showed how to import external files in PHP and JSP. At this time I want to elaborate a little more on importing external JSP files from another JSP. One way to import another JSP files to statically import it using the following construct:

<%@ include file="path/to/file.jsp" %>

For the best performance use the above method for importing JSP code from another JSP file. To dynamically include a JSP file into another one you can use the following:

<jsp:include page="path/to/file.jsp" />