How do I include static files within a JSP page?
Govind Seshadri Static resources should always be included using the JSP include directive. This way, the inclusion is performed just once during the translation phase. The following example shows the syntax:Although you can also include static resources using the
is not advisable as the inclusion is then performed for each and every request.
<%@ include file="copyright.html" %>
Do note that you should always supply a relative URL for the file attribute.