tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <j...@kewlstuff.co.za>
Subject Re: Shared Javascript, CSS, and Image Files
Date Tue, 13 May 2008 23:49:27 GMT

---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
The most powerful application server on earth.
The only real POJO Application Server.
---------------------------------------------------------------------------
----- Original Message ----- 
From: "John Buchholz" <johnb4444@yahoo.com>
To: <users@tomcat.apache.org>
Sent: Wednesday, May 14, 2008 1:21 AM
Subject: Shared Javascript, CSS, and Image Files


> Hi,
>
> I am looking for the recommended solution for when multiple webapps need 
> to use the same sets or javascript, css, and image files.  I have created 
> a symbolic link in $CATALINA_HOME/webapps/myapp called "shared" pointing 
> to /home/myhome/shared_files.   When I refer to /shared/test.js in my jsp, 
> it does not recognize it.  Is there something I need to do to tell Tomcat 
> to follow symbolic links or even better is there a recommended location 
> under $CATALINA_HOME for me to add my collection of shared files that will 
> be seen by all webapps?
----
John why are you doing that... maybe I'm missing something, but its not 
assembled "as it goes out", the browser comes back for it.
An easier way is to make a shared webapp, put all the stuff in there and 
then just address that web app.
Or think of say all the images CSS, js files sitting on an Apache server... 
you would just address them there.

JSP goes from any web app to browser... browser "comes back" and gets those 
files from (Apache/or a "single web app).
You just not going to use a relative url... will either hard code or bring 
in the "image context" from a parameter in web.xml etc.

Have fun...

> I am using Tomcat 5.5.23.
>
> Thanks so much for your help.
>
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message