My JSP looks similar to the following…
<%@page import "java.util.ArrayList"%>
<%@page import "java.util.List%>
<%@page contentType="application/json" pageEncoding="UTF-8"%>
<%
...
%>
Each <%%> is resulting in an extra new line… how can I prevent this from happening without having to glue all of the %><% together? This is resulting in 3+ new lines (pretty much one per import). If I blend all the imports together, it is still leaving at least one new line.
If you are using JSP 2.1 or higher you can use:
For older versions, and if you are using tomcat(!), you can use:
in your web.xml.