Check your pages do have DOS-style EOLs.

If you have javascript code like:

fuction a() {
  // comment
  ...
}

and IE is merging all in a single line, the closing bracket will become part
of the comment, so the interpreter will fail to find it.

You could check if this is the problem by editing a failing JSP, and
changing all line comments by /* */ (or removing them at all :-)

This problem is common when you pack a war in Unix and put it into a Tomcat
installed under Windows, but this is the first time I hear about it in an
"only-windows" environment. Why are there differences between XP and 2K, I
cannot say :-(

I have never test it, but I guess there is another workaround if the problem
is the EOL style of your JSPs. In your tomcat, you can modify your
conf/web.xml, and set the mappedfile init parameter of the jsp servlet to
true. This should force jasper to generate JSPs that do a println for each
JSP line, instead of merging multiple static lines into a single print. This
way, the "standard" EOL sequences will be sent to your browser.

Another approach, if you develop in Unix is to force the correct EOLs before
packaging, for example, through ant task "fixCRLF".

Hope this helps you,
Rodrigo Ruiz

----- Original Message -----
From: "Baer Peter Christoph Alexander" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Cc: "Kokemueller Detlef" <[EMAIL PROTECTED]>; "Al-Khwlani
Khaled" <[EMAIL PROTECTED]>
Sent: Tuesday, October 28, 2003 6:15 PM
Subject: JSP generated HTML code squashed in one line


> Hi,
>
> we have a problem here that looks pretty strange to us. We have
extensively
> searched the mail archive and we googled a lot, but found no suitable
> information. Should we nevertheless ask something obvious, please forgive
> us.
>
> Here is the problem:
> Tomcat 4.0.6 LE generates HTML pages with a lot of the code compressed
into
> a single line, when running on *some* machines under Windows XP. That is,
> the first line of the generated HTML is very long. This appears to confuse
> MSIE: We see lots of runtime exceptions regarding missing closing braces
> ("}").
> On another machine, running Windows 2000, an apparently identical
> installation works just fine. No such runtime errors.
>
> We found another difference in the work directory tree. The filenames of
the
> servlets on the Win XP machines start with _0002 and contain this string a
> number of times each. On the Win2k computer we have just jspname$jsp.java
as
> the name of the generated servlet.
>
> We don't know, if the two phenomena are connected, and we are absolutely
> clueless what the differences are caused by.
>
> If anyone of could give us a hint of how to make the Win XP installations
> work as properly as the Win2k instance, your help will be greatly
> appreciated!
>
> Our environments are: Windows 2000 (works fine) and Windows XP (sucks),
> J2SDK 1.4.2_01 from Sun and Tomcat 4.0.6 LE.
>
> Many thanks in advance!
>
> Regards
>
> Peter Bär
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to