You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Si Ly <sl...@pobox.com> on 2001/06/29 06:02:51 UTC
[PATCH] Fix extraneous CR ('\r') in generated servlets
When Tomcat generates servlet code from JSP, it changes all LF's into
CRLF's. Is there a good reason for this? I intentionally use only
LF's in my JSP files to save bandwidth, especially when they're large
JSP files.
In some cases, Tomcat produces ugly output with mixed LF and CRLF lines.
Example:
<p>Tomcat adds a CR on this line.</p>
<% out.println("Tomcat _doesn't_ add a CR on this line."); %>
Even worse, Tomcat converts only LF's to CRLF's. It completely ignores
CR's. So on a Mac (which uses CR-terminated lines), the whole JSP file
is converted into a single line!
Attached are two patches that I think will fix the problem. Any takers?
-- Si