Blank space JSTL

3

I'm having a really annoying problem, when my jsp is mounted I have a foreach in jstl that leaves my absurdly giant final code, worse than I realized it's just white space. Here is the code:

   <c:forEach var="column" items="${tela.targetXml.column}" varStatus="rowStatus" >
        <c:set var="podeAdicionar" value="true" />
        <c:forEach var="col" items="${tela.columns}" varStatus="colTelaStatus" >
            <c:if test="${col.nome == column.name}">
                <c:set var="podeAdicionar" value="false" />
            </c:if>
        </c:forEach>
        <c:if test="${column.visivel && podeAdicionar}">
            div2 = jQuery('<div class="col-md-12" onclick="adicionarColuna(\'${column.name}\', \'${column.label}\', this);event.preventDefault();event.stopPropagation();">');
            lb = jQuery('<label name="${column.name}">').text('${column.label}');
            div2.append(lb);
            div.append(div2);
        </c:if>
    </c:forEach>

This foreach excerpt leaves this blank:

I need to remove this, ideally not having to mimic the file to avoid errors.

    
asked by anonymous 29.06.2017 / 15:01

1 answer

3

I was able to resolve by adding the following configuration in my web.xml:

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

This setting removed on all my pages and worked quietly.

    
29.06.2017 / 15:28