<%@ page trimDirectiveWhitespaces="true" %> 去除产生的不必要的空格jsp版本需要在jsp2.1及以上版本使用才会有效
web.xml文件配置这种方法效率更高
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<trim-directive-whitespaces>true</trim-directive-whitespaces>
</jsp-property-group>
</jsp-config>
通过静态引入可以把多页面都要引用的包使用统一引入
<%@ include file="/backend/taglib.jsp" %>//静态引入(编译期)
动态引入可以让我们把整个网页划分为多个模块,从而实现模块的复用.
<jsp:include page="copyright.jsp"/> 用于引入别的页面到本页面
<%-- 这是JSP注释--%> JSP注释