You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eugeny N Dzhurinsky <eu...@jdevelop.com> on 2005/09/10 19:26:41 UTC

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


Re: empty lines in HTML output

Posted by Tim Funk <fu...@joedog.org>.
trimSpaces is a a feature of tomcat 5

-Tim

Eugeny N Dzhurinsky wrote:
> On Sat, Sep 10, 2005 at 09:36:16PM +0200, Leon Rosenberg wrote:
> 
>>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)
> 
> 
> This seem to not work on 4.1.**?
> 

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


Re: empty lines in HTML output

Posted by Eugeny N Dzhurinsky <eu...@jdevelop.com>.
On Sat, Sep 10, 2005 at 09:36:16PM +0200, Leon Rosenberg wrote:
> 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)

This seem to not work on 4.1.**?

-- 
Eugene N Dzhurinsky

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


Re: empty lines in HTML output

Posted by Leon Rosenberg <st...@anotheria.net>.
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