You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by br...@homepoint.com on 2000/08/21 20:20:33 UTC

includes including blank lines?

I've got some form validation code (along with other things like string
functions) stored in
JSP files that I'm using <%@ include file="..." %> to access.  I include
these at the beginning
of the file so I can use them later.

I recently created a JSP file which outputs data in tab delimited format
using an Excel mime type so it spawns excel and sends the data to a
spreadsheet
automatically.  All of this works extremely well - except that I noticed
there were
10-20 blank rows in the spreadsheet.

After examing all the code I found that the following code:
<%@ include file="func/session.jsp" %>
<%@ include file="func/forms.jsp" %>
<%@ include file="func/strings.jsp" %>

Because there are carriage returns between each of these that's 3 blank
lines,
then the actual included file has a carriage return somewhere in it (maybe
the EOF
or something), thats another 3 blank lines... is there any way to remove
these
from the buffer, or a way I could stop this from happening using Tomcat
maybe?
Seems like it would be fairly easy for the server to strip off leading
and/or ending
carriage returns.

Thanks,

- Brent


RE: includes including blank lines?

Posted by Damian Golda <da...@iif.pl>.
Try writing includes in one line e.g.:

<%@ include file="func/session.jsp" %><%@ include file="func/forms.jsp"
%><%@ include file="func/strings.jsp" %>

In this case there are no CR chars.

---
Damian Golda

Damian@iif.pl


-----Original Message-----
From: brent.johnson@homepoint.com [mailto:brent.johnson@homepoint.com]
Sent: Monday, August 21, 2000 8:21 PM
To: tomcat-user@jakarta.apache.org
Subject: includes including blank lines?


I've got some form validation code (along with other things like string
functions) stored in
JSP files that I'm using <%@ include file="..." %> to access.  I include
these at the beginning
of the file so I can use them later.

I recently created a JSP file which outputs data in tab delimited format
using an Excel mime type so it spawns excel and sends the data to a
spreadsheet
automatically.  All of this works extremely well - except that I noticed
there were
10-20 blank rows in the spreadsheet.

After examing all the code I found that the following code:
<%@ include file="func/session.jsp" %>
<%@ include file="func/forms.jsp" %>
<%@ include file="func/strings.jsp" %>

Because there are carriage returns between each of these that's 3 blank
lines,
then the actual included file has a carriage return somewhere in it (maybe
the EOF
or something), thats another 3 blank lines... is there any way to remove
these
from the buffer, or a way I could stop this from happening using Tomcat
maybe?
Seems like it would be fairly easy for the server to strip off leading
and/or ending
carriage returns.

Thanks,

- Brent