tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Boaz Shaham <Bo...@farechase.com>
Subject RE: want to preporcess javascript files
Date Thu, 28 Dec 2000 09:16:33 GMT
I had that problem too. Some notes:

- I dont see why a js file won't be handled like a jsp regarding source
control and revision history.

- It costs you in performance to use js in jsp - you make the Tomcat
generate them again and again for each request. I guess that the js code is
quite static and not changed between requests, so that generation is
unnecessary.

- I have a js file whose code depends on some other java classes. I have
made in java a sort of preprocessor that create it whenever a new version is
required.

If you still want to use it as jsp - try add to these files a header
indicating the mime type for js code (dont know what it is)


- Boaz

-----Original Message-----
From: Tim Cronin [mailto:tcronin@AUSTIN.CollegeClub.com]
Sent: Wednesday, December 27, 2000 23:17
To: 'tomcat-user@jakarta.apache.org'
Cc: Paul Lange; Frank Livaudais; Rex Staples
Subject: want to preporcess javascript files


I was initially using jsp files to contain javascript. This way I could
have them documented and keep revision history in them for development
then have the commenst stripped out when they were deployed to clients.

This works fine in IE. but causes Netscape to hang. I tryed to change
them back to js and add a handler to preprocess these files as well
but could not get it to work.

Any solutions?

Mime
View raw message