首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > JavaScript >

【转】JSP往空白行

2014-04-20 
【转】JSP去空白行*.jsp

【转】JSP去空白行
<jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <trim-directive-whitespaces>true</trim-directive-whitespaces> </jsp-property-group></jsp-config>

?

?

这种方式是在jsp 编译成class时将空白行去掉,因此是一次完成,效率很高。

?

?

2、在每个JSP的头上加上一段代码?? <%@?page?trimDirectiveWhitespaces="true"?%>

?

以上两种方法取其一即可,建议使用第一种

热点排行