You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jerry Jalenak <Je...@LABONE.com> on 2004/02/20 17:07:02 UTC

Extra Lines in Compiled JSP

Hi All,

I should know how to fix this, but am at a loss.  At the top of my JSP I
have the following lines:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
<%@ taglib uri="/display" prefix="display" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested"
prefix="nested" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"
%>
<%@ page language="java" %>
<%@ page contentType="text/html; charset=UTF-8" %>

When I look at the compiled JSP, there are seven blank lines (i.e.
out.write("\r\n"); ).  Is there anyway to have the JSP compiler (were
running Tomcat 5.0.18 Stable) NOT generate these lines?  I guess they come
from the <%.... %> sources lines, but it really screws up my generated HTML
code....


Thanks!

Jerry Jalenak
Development Manager, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

jerry.jalenak@labone.com


This transmission (and any information attached to it) may be confidential and
is intended solely for the use of the individual or entity to which it is
addressed. If you are not the intended recipient or the person responsible for
delivering the transmission to the intended recipient, be advised that you
have received this transmission in error and that any use, dissemination,
forwarding, printing, or copying of this information is strictly prohibited.
If you have received this transmission in error, please immediately notify
LabOne at the following email address: securityincidentreporting@labone.com


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Extra Lines in Compiled JSP

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
Maybe I just dreamt this but I thought I remember one of the tomcat 
committers saying here that they had added a config option to remove 
these blank lines around JSP & taglib tags, and set the configuration 
option by default to false/off, because it violates the JSP spec.

I just quickly searched the archives and found no reference to it. 
Sorry, must have been a dream after all. (nice dream though)

On 02/20/2004 05:15 PM Guillermo Meyer wrote:
> I had this problem that produced me a CSV file with blank lines at top.
> I solved it by removing al <enter> in the file, I mean, JSP tags
> (including <%@ tags, etc) are all concatenated without break lines.
> You will get the ugliest JSP page you have ever seen from developer
> perspective, but this solved my problem.
> 
> Cheers.
> Guillermo.
> 
> -----Original Message-----
> From: Jerry Jalenak [mailto:Jerry.Jalenak@LABONE.com] 
> Sent: Viernes, 20 de Febrero de 2004 01:07 p.m.
> To: 'struts-user@jakarta.apache.org'
> Subject: Extra Lines in Compiled JSP
> 
> 
> Hi All,
> 
> I should know how to fix this, but am at a loss.  At the top of my JSP I
> have the following lines:
> 
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
> prefix="bean" %> <%@ taglib uri="/display" prefix="display" %> <%@
> taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-nested"
> prefix="nested" %>
> <%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
> prefix="tiles" %> <%@ page language="java" %> <%@ page
> contentType="text/html; charset=UTF-8" %>
> 
> When I look at the compiled JSP, there are seven blank lines (i.e.
> out.write("\r\n"); ).  Is there anyway to have the JSP compiler (were
> running Tomcat 5.0.18 Stable) NOT generate these lines?  I guess they
> come from the <%.... %> sources lines, but it really screws up my
> generated HTML code....
> 
> 
> Thanks!
> 
> Jerry Jalenak
> Development Manager, Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
> 
> jerry.jalenak@labone.com
> 
> 
> This transmission (and any information attached to it) may be
> confidential and is intended solely for the use of the individual or
> entity to which it is addressed. If you are not the intended recipient
> or the person responsible for delivering the transmission to the
> intended recipient, be advised that you have received this transmission
> in error and that any use, dissemination, forwarding, printing, or
> copying of this information is strictly prohibited. If you have received
> this transmission in error, please immediately notify LabOne at the
> following email address: securityincidentreporting@labone.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> NOTA DE CONFIDENCIALIDAD
> Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 
> 


-- 
struts 1.1 + tomcat 5.0.16 + java 1.4.2
Linux 2.4.20 Debian


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Extra Lines in Compiled JSP

Posted by Guillermo Meyer <gm...@interbanking.com.ar>.
I had this problem that produced me a CSV file with blank lines at top.
I solved it by removing al <enter> in the file, I mean, JSP tags
(including <%@ tags, etc) are all concatenated without break lines.
You will get the ugliest JSP page you have ever seen from developer
perspective, but this solved my problem.

Cheers.
Guillermo.

-----Original Message-----
From: Jerry Jalenak [mailto:Jerry.Jalenak@LABONE.com] 
Sent: Viernes, 20 de Febrero de 2004 01:07 p.m.
To: 'struts-user@jakarta.apache.org'
Subject: Extra Lines in Compiled JSP


Hi All,

I should know how to fix this, but am at a loss.  At the top of my JSP I
have the following lines:

<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean"
prefix="bean" %> <%@ taglib uri="/display" prefix="display" %> <%@
taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-nested"
prefix="nested" %>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
prefix="tiles" %> <%@ page language="java" %> <%@ page
contentType="text/html; charset=UTF-8" %>

When I look at the compiled JSP, there are seven blank lines (i.e.
out.write("\r\n"); ).  Is there anyway to have the JSP compiler (were
running Tomcat 5.0.18 Stable) NOT generate these lines?  I guess they
come from the <%.... %> sources lines, but it really screws up my
generated HTML code....


Thanks!

Jerry Jalenak
Development Manager, Web Publishing
LabOne, Inc.
10101 Renner Blvd.
Lenexa, KS  66219
(913) 577-1496

jerry.jalenak@labone.com


This transmission (and any information attached to it) may be
confidential and is intended solely for the use of the individual or
entity to which it is addressed. If you are not the intended recipient
or the person responsible for delivering the transmission to the
intended recipient, be advised that you have received this transmission
in error and that any use, dissemination, forwarding, printing, or
copying of this information is strictly prohibited. If you have received
this transmission in error, please immediately notify LabOne at the
following email address: securityincidentreporting@labone.com


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org

NOTA DE CONFIDENCIALIDAD
Este mensaje (y sus anexos) es confidencial, esta dirigido exclusivamente a las personas direccionadas en el mail y puede contener informacion (i)de propiedad exclusiva de Interbanking S.A. o (ii) amparada por el secreto profesional. Cualquier opinion en el contenido, es exclusiva de su autor y no representa necesariamente la opinion de Interbanking S.A. El acceso no autorizado, uso, reproduccion, o divulgacion esta prohibido. Interbanking S.A no asumira responsabilidad ni obligacion legal alguna por cualquier informacion incorrecta o alterada contenida en este mensaje. Si usted ha recibido este mensaje por error, le rogamos tenga la amabilidad de destruirlo inmediatamente junto con todas las copias del mismo, notificando al remitente. No debera utilizar, revelar, distribuir, imprimir o copiar este mensaje ni ninguna de sus partes si usted no es el destinatario. Muchas gracias.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Extra Lines in Compiled JSP

Posted by Hubert Rabago <ja...@yahoo.com>.
Try this:
<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"
%><%@ taglib uri="/display" prefix="display" 
%><%@ taglib uri="http://jakarta.apache.org/struts/tags-html" prefix="html"
%><%@ taglib uri="http://jakarta.apache.org/struts/tags-nested"
prefix="nested" 
%><%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"
%><%@ page language="java" 
%><%@ page contentType="text/html; charset=UTF-8" %>

The idea being you try to contain the \r\n inside the tags and outside the
template text.

--- Jerry Jalenak <Je...@LABONE.com> wrote:
> Hi All,
> 
> I should know how to fix this, but am at a loss.  At the top of my JSP I
> have the following lines:
> 
> 
> When I look at the compiled JSP, there are seven blank lines (i.e.
> out.write("\r\n"); ).  Is there anyway to have the JSP compiler (were
> running Tomcat 5.0.18 Stable) NOT generate these lines?  I guess they come
> from the <%.... %> sources lines, but it really screws up my generated HTML
> code....
> 
> 
> Thanks!
> 
> Jerry Jalenak
> Development Manager, Web Publishing
> LabOne, Inc.
> 10101 Renner Blvd.
> Lenexa, KS  66219
> (913) 577-1496
> 
> jerry.jalenak@labone.com
> 
> 
> This transmission (and any information attached to it) may be confidential
> and
> is intended solely for the use of the individual or entity to which it is
> addressed. If you are not the intended recipient or the person responsible
> for
> delivering the transmission to the intended recipient, be advised that you
> have received this transmission in error and that any use, dissemination,
> forwarding, printing, or copying of this information is strictly
> prohibited.
> If you have received this transmission in error, please immediately notify
> LabOne at the following email address: securityincidentreporting@labone.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org