zoukankan      html  css  js  c++  java
  • Strip whitespace from jsp output

    There is a trimWhiteSpaces directive that should accomplish this,

    In your JSP:

    <%@ page trimDirectiveWhitespaces="true" %>

    Or in the jsp-config section your web.xml (Note that this works starting from servlet specification 2.5.):

    <jsp-config>
     
    <jsp-property-group>
       
    <url-pattern>*.jsp</url-pattern>
       
    <trim-directive-whitespaces>true</trim-directive-whitespaces>
     
    </jsp-property-group>
    </jsp-config>

    Unfortunately if you have a required space it might also need strip that, so you may need a non-breaking space in some locations.

  • 相关阅读:
    监听
    用户管理
    oracle网络
    实例 参数
    存储管理
    oracle 体系
    实例
    修改
    集合操作
    17.08.18
  • 原文地址:https://www.cnblogs.com/wucg/p/2698213.html
Copyright © 2011-2022 走看看