tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leon Rosenberg" <struts_u...@anotheria.net>
Subject Re: empty lines in HTML output
Date Sat, 10 Sep 2005 19:36:16 GMT
Check for trimSpaces parameter in to the jsp servlet in conf/web.xml

But beware, combined with genStrAsCharArray option it can crash your tomcat
(at least it does with mine, at 5.0.25)


  <!--   trimSpaces          Should white spaces in template text between
-->
  <!--                       actions or directives be trimmed?  [false]
-->

Then you have to change it to something like this:
    <servlet>
        <servlet-name>jsp</servlet-name>
        <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
        <init-param>
            <param-name>fork</param-name>
            <param-value>false</param-value>
        </init-param>
....
        <init-param>
            <param-name>trimSpaces</param-name>
            <param-value>true</param-value>
        </init-param>
...
   </servlet>
 

The other option you have is to close tags on next lines:
Instead of:
<logic:equal ...>
  <bean:write ...>
</logic:equal>

Use:
<logic:equal ...
 ><bean:write ....
></logic:equal>
Same applies to the jsp declaration and taglib import.

Regards
Leon



> -----Urspr√ľngliche Nachricht-----
> Von: Eugeny N Dzhurinsky [mailto:eugenydzh@jdevelop.com] 
> Gesendet: Samstag, 10. September 2005 19:27
> An: tomcat-user@jakarta.apache.org
> Betreff: JSP: empty lines in HTML output
> 
> Hello! Is there any way to suppress the empty lines in JSPs 
> at the scriplet positions/JSP tags?
> 
> --
> Eugene N Dzhurinsky
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 



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


Mime
View raw message