<%@ page language="java" %>
<%
String name = "Foo Bar";
%>
<html>
<body>
<h1>Welcome <%=name%> to this page!</h1>
</body>
</html>
Becomes this after formatting :
<%@ page language="java" %>
<%
String name = "Foo Bar";
%>
<html>
<body>
<h1>Welcome<%=name%>to this page!</h1>
</body>
</html>
This is a problem. The first chunk will show : “Welcome Foo Bar to this page!”, the second will show “WelcomeFoo Barto this page!” The formatter consistantly will remove leading and trailing spaces around <%= %> scriptlets. I do not know if this is true for more complicated scriptlet code or not.