You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dan Payne <dp...@sotx.org> on 2002/09/12 04:25:51 UTC

Tomcat appending garbage to files ending in .js

All,

I've got a JSP with an embedded Javascript Source File request.  When Tomcat
(4.0.4) serves up the file, it appends this to the end of the file:

/*HTTP/1.1 200 OK Content-Length: 0 Date: Thu, 12 Sep 2002 02:13:50 GMT
Server: Apache Tomcat/4.0 (HTTP/1.1 Connector)

It's causing my browser to throw some nasty javascript errors. And if I
rename the file with an extension other than .js, it seems to work fine.

Anybody?


Example below:

<html>
<head>
<title>Problem</title>
<script language="JavaScript" src="/include/functions.js"></script>
</head>
<body>
foo
</body>
</html>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Tomcat appending garbage to files ending in .js

Posted by Dan Payne <dp...@sotx.org>.
Here's the entry a request for the file produces in my log:

207.200.54.58 - - [12/Sep/2002:13:02:44 -0600] "GET /include/functions.js
HTTP/1.1" 304 -

I'm really not understanding this.  If you'd like to test run it, access:

http://216.65.197.44/include/functions.js

The odd thing is is that it doesn't do this on all my computers.  Works fine
on my Win2000 desktop with IE 6.0.2600.0000 (no  updates) and not my Win2000
laptop with IE 6.0.2600.0000, updates (Q321232, Q323759).  Anybody know
what's going on here?

The log entry for my computer it does work for is either one of these two:

207.200.54.58 - - [12/Sep/2002:13:14:17 -0600] "GET /include/functions.js
HTTP/1.1" 304 -
207.200.54.58 - - [12/Sep/2002:13:14:17 -0600] "GET /include/functions.js
HTTP/1.1" 200 423

Weird.

-Dan

-----Original Message-----
From: Dan Payne [mailto:dpayne@sotx.org]
Sent: Wednesday, September 11, 2002 9:26 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat appending garbage to files ending in .js


All,

I've got a JSP with an embedded Javascript Source File request.  When Tomcat
(4.0.4) serves up the file, it appends this to the end of the file:

/*HTTP/1.1 200 OK Content-Length: 0 Date: Thu, 12 Sep 2002 02:13:50 GMT
Server: Apache Tomcat/4.0 (HTTP/1.1 Connector)

It's causing my browser to throw some nasty javascript errors. And if I
rename the file with an extension other than .js, it seems to work fine.

Anybody?


Example below:

<html>
<head>
<title>Problem</title>
<script language="JavaScript" src="/include/functions.js"></script>
</head>
<body>
foo
</body>
</html>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>