我使用的是 tomcat 8,并且必须遵循 Web 应用程序构造中应用程序的 web.xml 中的指令,但空间没有被修剪。有什么问题或如何调试吗?
<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<trim-directive-whitespaces>true</trim-directive-whitespaces>
</jsp-property-group>
</jsp-config>
最佳答案
所以 native trim-directive-whitespaces 指令似乎不起作用,但这个库可以。它还会删除 HTML 注释。
关于tomcat修剪空白,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40388845/