You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christoph Kukulies <ku...@gilberto.physik.rwth-aachen.de> on 2001/05/17 19:30:53 UTC

inserted line feeds in concatenated strings

I'm seeing different browser behaviour between unix netscape
vs. Windows (NT) Netscape or MSIE.

I'm generating a page with text between <PRE>...</PRE>.
The text is generated via out.println(text + "," + number);
and I get a line break after 'text' while under Unix browsers I don't
get a line break.

Any idea?
-- 
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de

Re: inserted line feeds in concatenated strings

Posted by Tim O'Neil <ti...@xythos.com>.
At 07:30 PM 5/17/2001 +0200, you wrote:

>I'm seeing different browser behaviour between unix netscape
>vs. Windows (NT) Netscape or MSIE.
>
>I'm generating a page with text between <PRE>...</PRE>.
>The text is generated via out.println(text + "," + number);
>and I get a line break after 'text' while under Unix browsers I don't
>get a line break.
>
>Any idea?

Yep.









Oh, you want the idea? Use the System property to get
the line.separator property and use that rather than
assume that line breaks will happen. (They obviously
won't on every platform unless you use the System
property object, as you have experienced.)