从jsp输出的条形空白区如何从jsp页面的输出中去掉额外的空白?我可以在web.xml上打开开关吗?是否有Tomcat特定设置?
3 回答
翻过高山走不出你
TA贡献1875条经验 获得超3个赞
<%@ page trimDirectiveWhitespaces="true" %>
<jsp-config> <jsp-property-group> <url-pattern>*.jsp</url-pattern> <trim-directive-whitespaces>true</trim-directive-whitespaces> </jsp-property-group></jsp-config>
饮歌长啸
TA贡献1951条经验 获得超3个赞
trimDirectiveWhitespacesJspServlettrimSpacestrueJspServlet/conf/web.xml:
<init-param> <param-name>trimSpaces</param-name> <param-value>true</param-value></init-param>
添加回答
举报
0/150
提交
取消
