You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Terry J Fundak <te...@tjsoftworks.com> on 2002/03/28 08:45:38 UTC

Is there a way to stop Tomcat 4.0.1 from writing whole JSP's as a single lines? The Cause of Javascript Problems

Background:
I have switched from Tomcat 3.23/Servlet 1.31 on a SUN server to Tomcat
4.0.1 on Mac OS X.1.2.

Everything SEEMED to be working fine (after quite a struggle with
configuration which has to do with documentation.)
(I know everyone has heard this before but I really need to add my two
cent worth...)

...I thought everything worked fine BUT ... then I noticed all my JSP
pages now have broken JAVASCRIPTs...

I figured out the reason why by using a <editorial comment>really
great</editional comment> browser/editor OMNIWEB.

The reason why is that with my installed version of Tomcat 4.0.1 ,all
the JSPs are written out as a very long single line of
<html>....................</html>

Now this didn't really bother me 'till I noticed that this breaks the
JAVASCRIPT because browsers need the Javascript to be enclosed into <!--
.......//--> blocks but in the form

<!-- <CR>
Script functions here ....... <CR>
//--><CR>

The important point is that there needs to be a <CR> carriage return
after the <!-- so that it is a seperate line

Does anyone know of a way to make Tomcat leave the formating of a page
alone?

Thanks for your help,

Terry


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Is there a way to stop Tomcat 4.0.1 from writing whole JSP's as a single lines? The Cause of Javascript Problems

Posted by Terry J Fundak <te...@tjsoftworks.com>.
Disregard my post...

The problem was that I forgot to change the <CR> to UNIX <LF> when I moved
to Mac OS X...

Sorry about that...

But also a reminder to other Mac OS X users... your files need to have UNIX
<LF> when to transfer them to the OS X server directory... otherwise you
will have difficulty with your Javascript...

Terry

Terry J Fundak wrote:

> Background:
> I have switched from Tomcat 3.23/Servlet 1.31 on a SUN server to Tomcat
> 4.0.1 on Mac OS X.1.2.
>
> Everything SEEMED to be working fine (after quite a struggle with
> configuration which has to do with documentation.)
> (I know everyone has heard this before but I really need to add my two
> cent worth...)
>
> ...I thought everything worked fine BUT ... then I noticed all my JSP
> pages now have broken JAVASCRIPTs...
>
> I figured out the reason why by using a <editorial comment>really
> great</editional comment> browser/editor OMNIWEB.
>
> The reason why is that with my installed version of Tomcat 4.0.1 ,all
> the JSPs are written out as a very long single line of
> <html>....................</html>
>
> Now this didn't really bother me 'till I noticed that this breaks the
> JAVASCRIPT because browsers need the Javascript to be enclosed into <!--
> .......//--> blocks but in the form
>
> <!-- <CR>
> Script functions here ....... <CR>
> //--><CR>
>
> The important point is that there needs to be a <CR> carriage return
> after the <!-- so that it is a seperate line
>
> Does anyone know of a way to make Tomcat leave the formating of a page
> alone?
>
> Thanks for your help,
>
> Terry


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>