Mantis - Resin
Viewing Issue Advanced Details
4899 minor always 12-17-11 06:01 06-18-12 13:38
salah  
ferg  
high  
closed 4.0.25  
no change required  
none    
none  
0004899: trim-directive-whitespaces cannot remove whitespace between JSP directives and HTML or text
trim-directive-whitespaces cannot remove whitespace between JSP directives and HTML or Text
eg:
-----jsp source begin-----
<%--
  Created by IntelliJ IDEA.
  User: salahgao
  Date: 11-12-16
  Time: &19979;&21320;7:42
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.List" %>
<html>
  <head>
    <title></title>
  </head>
  <body>
    <%-- line --%>
    Hello World!
  </body>
</html>
-----jsp source begin-----

output
-----html begin-----

<html>
  <head>
    <title></title>
  </head>
  <body>
    
    Hello World!
  </body>
</html>
-----html end-----


Notes
(0005871)
ferg   
06-18-12 13:38   
Resin's behavior is correct (checked against JSP spec.) The trim-directive-whitespace only removes text nodes that are pure text. Whitespace ahead of tags or behind tags are not removed, only completely whitespace nodes.