Re: Shared Javascript, CSS, and Image Files

2008-05-15 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephen,

Stephen Souness wrote:
| The symbolic link solution should be fine as long as you configure
| Tomcat to follow symbolic links (see Steve O's response in this thread).
|
| Having a shared webapp as suggested by Johnny could lead to problems
| with cross site scripting restrictions for the Javascript code if any
| cookies were involved.

Not really. This would be cross-context scripting, and as long as you
set your cookies' path to be /, you should be okay.

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgsV4AACgkQ9CaO5/Lv0PCjeQCfSviPc79JAZCXibQnSEp6pUen
1AEAnRPhgDAXl7uEByr42pwxZFiWjnpa
=2Nl/
-END PGP SIGNATURE-

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



Re: Shared Javascript, CSS, and Image Files

2008-05-15 Thread Stephen Souness

Christopher Schultz wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Stephen,

Stephen Souness wrote:
| The symbolic link solution should be fine as long as you configure
| Tomcat to follow symbolic links (see Steve O's response in this thread).
|
| Having a shared webapp as suggested by Johnny could lead to problems
| with cross site scripting restrictions for the Javascript code if any
| cookies were involved.

Not really. This would be cross-context scripting, and as long as you
set your cookies' path to be /, you should be okay.

- -chris



True, provided that the webapps are under the same domain name :)

If the shared webapp has it's own domain name (e.g. 
http://images.myapp.com/ ) then the cross-site scripting restrictions 
that I mentioned could arise.


The original post didn't mention whether the webapps were on separate 
domain names, so I assumed...



Regards,

Stephen



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgsV4AACgkQ9CaO5/Lv0PCjeQCfSviPc79JAZCXibQnSEp6pUen
1AEAnRPhgDAXl7uEByr42pwxZFiWjnpa
=2Nl/
-END PGP SIGNATURE-

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





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



Re: Shared Javascript, CSS, and Image Files

2008-05-14 Thread Steve Ochani
Date sent:  Tue, 13 May 2008 16:21:22 -0700 (PDT)
From:   John Buchholz [EMAIL PROTECTED]
Subject:Shared Javascript, CSS, and Image Files
To: users@tomcat.apache.org
Send reply to:  Tomcat Users List users@tomcat.apache.org

 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?
 
 I am using Tomcat 5.5.23.
 

You have to use the allowLinking attribute in your context config.

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html


-Steve O.


-
Steve O.
http://www.steveo.us

B17G WWII Bomber Yankee Lady Flight
http://www.steveo.us/b17ride

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



Re: Shared Javascript, CSS, and Image Files

2008-05-14 Thread Stephen Souness
The symbolic link solution should be fine as long as you configure 
Tomcat to follow symbolic links (see Steve O's response in this thread).


Having a shared webapp as suggested by Johnny could lead to problems 
with cross site scripting restrictions for the Javascript code if any 
cookies were involved.



--
Stephen Souness



Johnny Kewl wrote:


- Original Message - From: John Buchholz [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





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



Shared Javascript, CSS, and Image Files

2008-05-13 Thread John Buchholz
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?

I am using Tomcat 5.5.23.

Thanks so much for your help.

   

Re: Shared Javascript, CSS, and Image Files

2008-05-13 Thread David Fisher

Hi,

Probably you should refer to it as shared/test.js without the  
leading /


Regards,
Dave

On May 13, 2008, at 6:21 PM, John Buchholz wrote:


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?


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Shared Javascript, CSS, and Image Files

2008-05-13 Thread Johnny Kewl


---
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 [EMAIL PROTECTED]

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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]