You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Cristian Peraferrer <co...@gmail.com> on 2009/04/06 13:14:43 UTC

Empty lines before doctype declaration

I'm using struts 2.1.6, using JSP's with Tiles plugin, and I'm getting  
empty lines before the doctype, but in my JSP's there aren't spaces.  
Where I should look at?

Thanks,
Cristian.

-- 
GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch


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


RE: Empty lines before doctype declaration

Posted by Martin Gainty <mg...@hotmail.com>.
If you are seeing
org.xml.sax.SAXParseException: Content is not allowed in prolog.

I see 3 struts Libraries which throw SAXParseException:

\WEB-INF\lib\commons-el-1.0.jar
\WEB-INF\lib\ognl-2.6.11.jar
\WEB-INF\lib\velocity-1.4.jar

I wouldcheck these version-specific jars are in your classpath

?
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung / Note de déni et de confidentialité 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.






> From: corellian.c@gmail.com
> To: user@struts.apache.org
> Subject: Empty lines before doctype declaration
> Date: Mon, 6 Apr 2009 13:14:43 +0200
> 
> I'm using struts 2.1.6, using JSP's with Tiles plugin, and I'm getting  
> empty lines before the doctype, but in my JSP's there aren't spaces.  
> Where I should look at?
> 
> Thanks,
> Cristian.
> 
> -- 
> GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_042009

Re: Empty lines before doctype declaration

Posted by Lukasz Lenart <lu...@googlemail.com>.
2009/4/6 Cristian Peraferrer <co...@gmail.com>:
> I'm using struts 2.1.6, using JSP's with Tiles plugin, and I'm getting empty
> lines before the doctype, but in my JSP's there aren't spaces. Where I
> should look at?

Maybe it's an encoding problem? Some UTF8 with BOM?


Regards
-- 
Lukasz
http://www.lenart.org.pl/

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


Re: Empty lines before doctype declaration

Posted by Cristian Peraferrer <co...@gmail.com>.
I have seen that the problem wasn't related with UTF-8 nor the XML  
parser.
It is about JSP configuration, I have put the following in my web.xml:

<!-- Avoid unwanted newlines and spaces -->
<jsp-config>
  <jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
    <trim-directive-whitespaces>true</trim-directive-whitespaces>
  </jsp-property-group>
</jsp-config>

This solved my problem.

On 06/04/2009, at 13:14, Cristian Peraferrer wrote:

> I'm using struts 2.1.6, using JSP's with Tiles plugin, and I'm  
> getting empty lines before the doctype, but in my JSP's there aren't  
> spaces. Where I should look at?
>
> Thanks,
> Cristian.
>
> -- 
> GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch
>

-- 
GPG Key-ID: 0x564903FA - Jabber ID: corellian at swissjabber.ch


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