Re: WebApps sharing uploaded files

2011-10-05 Thread Léa Massiot
Hello. Ok. I found what I was doing wrong and corrected my mistake: added "/w1" at the beginning of the "href" attribute value. See below: 2.C) test_download.html Test download /w1/attachments/foo.txt Foo.txt Now it works! Best regards, -- Léa -- View this message in co

Re: WebApps sharing uploaded files

2011-10-05 Thread Léa Massiot
Hello. Ok. I found what I was doing wrong and corrected my mistake: added "/w1" at the beginning of the "href" attribute value. See below: 2.C) test_download.html Test download /w1/attachments/foo.txt Foo.txt Now it works! Best regards, -- Léa -- View this message in co

Re: WebApps sharing uploaded files

2011-10-05 Thread Léa Massiot
Hello. Ok. I found what I was doing wrong and corrected my mistake: added "/w1" at the beginning of the "href" attribute value. See below: 2.C) test_download.html Test download /w1/attachments/foo.txt Foo.txt Now it works! Best regards, -- Léa -- View this message in co

Re: WebApps sharing uploaded files

2011-10-05 Thread Léa Massiot
chris wrote: > > Be careful: if you undeploy the webapp, you will have all those files > deleted by Tomcat. > Ok. Thank you! André wrote: > > Thanks. Seen. Lea, do you follow ? > Yes, thanks! Ok. I do not properly understand the doc.: http://tomcat.apache.org/tomcat-7.0-doc/config/contex

Re: WebApps sharing uploaded files

2011-10-04 Thread markt
"André Warnier" wrote: >Christopher Schultz wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> André, >> >> On 10/4/2011 1:31 PM, André Warnier wrote: >>> Or, wasn't there a possibility to place a symlink within the >>> webapps dir, and have Tomcat /not/ following it when undeploy

Re: WebApps sharing uploaded files

2011-10-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 10/4/2011 1:56 PM, André Warnier wrote: > quote > > allowLinking > > If the value of this flag is true, symlinks will be allowed inside > the web application, pointing to resources outside the web > application base path. If not specified,

Re: WebApps sharing uploaded files

2011-10-04 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 10/4/2011 1:31 PM, André Warnier wrote: Or, wasn't there a possibility to place a symlink within the webapps dir, and have Tomcat /not/ following it when undeploying ? Or was that precisely the catch, that it al

Re: WebApps sharing uploaded files

2011-10-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 10/4/2011 1:31 PM, André Warnier wrote: > Or, wasn't there a possibility to place a symlink within the > webapps dir, and have Tomcat /not/ following it when undeploying ? > Or was that precisely the catch, that it always does ? Look for "a

Re: WebApps sharing uploaded files

2011-10-04 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Léa, On 9/30/2011 2:37 PM, Léa Massiot wrote: o I have two WebApps "w1" and "w2" (under the Tomcat "webapps" directory). o Both "w1" and "w2" contain (at least) a JSP which allows to upload files to the server. o Presentl

Re: WebApps sharing uploaded files

2011-10-04 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Léa, On 9/30/2011 2:37 PM, Léa Massiot wrote: > o I have two WebApps "w1" and "w2" (under the Tomcat "webapps" > directory). o Both "w1" and "w2" contain (at least) a JSP which > allows to upload files to the server. o Presently, the uploaded > files

Re: WebApps sharing uploaded files

2011-10-04 Thread André Warnier
Léa Massiot wrote: ... What's interesting is that, in the same servlets container, one WebApp "has access" to another WebApp through "/w1/uf1/f.txt" "/w2/uf2/f.txt" type of addressing. That's only because you look at it the wrong way. It is not that "one webapp has access to another webapp", i

Re: WebApps sharing uploaded files

2011-10-04 Thread Léa Massiot
Hello André, > Do you mean that you are going to create a new JSP for every new file > someone may ever upload? No... > Or do they always upload the same file "f.txt"? No... I understand your being puzzled... my bad: the example I posted is oversimple but it works if tested! In reality, the "

Re: WebApps sharing uploaded files

2011-10-04 Thread Léa Massiot
Hello André, > Do you mean that you are going to create a new JSP for every new file > someone may ever upload? No... > Or do they always upload the same file "f.txt"? No... I understand your being puzzled... my bad: the example I posted is oversimple but it works if tested! In reality, the "

Re: WebApps sharing uploaded files

2011-10-03 Thread André Warnier
Léa Massiot wrote: Hello, I solved my problem: 1) in WebApp "w1", upload files to the directory "w1\uf1\", 2) in WebApp "w2", upload files to the directory "w1\uf2\", 3) then you can have the same JSP "foo.jsp" for both WebApps. Put one JSP in "w1" and another one in "w2". The JSP itself contain

Re: WebApps sharing uploaded files

2011-10-03 Thread Léa Massiot
Hello Tim, Ok. - I have only one copy of "f.txt". - "uf1" and "uf2" are two distinct directories, the first in "w1", the second in "w2". - I have one JSP (same code) but two copies of it, the first in "w1", the second in "w2". "f.txt" either lives under "uf1" xor "uf2". Maybe I'm not clear enough.

Re: WebApps sharing uploaded files

2011-10-03 Thread Tim Watts
It does? Doesn't that mean you have two distinct copies of f.txt? I thought that's what you were trying to avoid. Or are uf1 and uf2 aliases for the same directory? Or was your goal really to have one JSP that would work in w1 and w2? On Mon, 2011-10-03 at 10:15 -0700, Léa Massiot wrote: > Hello,

Re: WebApps sharing uploaded files

2011-10-03 Thread Léa Massiot
Hello, I solved my problem: 1) in WebApp "w1", upload files to the directory "w1\uf1\", 2) in WebApp "w2", upload files to the directory "w1\uf2\", 3) then you can have the same JSP "foo.jsp" for both WebApps. Put one JSP in "w1" and another one in "w2". The JSP itself contains a switch:

Re: WebApps sharing uploaded files

2011-10-03 Thread Léa Massiot
Hello André, Thank you for all these useful advices. Best regards, -- Léa -- View this message in context: http://old.nabble.com/WebApps-sharing-uploaded-files-tp32570911p32582797.html Sent from the Tomcat - User mailing list archive at Nabble.com. -

Re: WebApps sharing uploaded files

2011-10-01 Thread André Warnier
Léa Massiot wrote: Hello André, Thank you for your answer. awarnier wrote: You can define "uf" wherever you want, as long as Tomcat (and the applications which run under it, like your JSPs) has write access to it. Actually, I already noticed and tried that and my first question is closely

Re: WebApps sharing uploaded files

2011-10-01 Thread Léa Massiot
Hello André, Thank you for your answer. awarnier wrote: > > You can define "uf" wherever you want, as long as Tomcat (and the > applications > which run under it, like your JSPs) has write access to it. > Actually, I already noticed and tried that and my first question is closely linked to m

Re: WebApps sharing uploaded files

2011-09-30 Thread André Warnier
Léa Massiot wrote: Hello, Thank you for reading my post. o I have two WebApps "w1" and "w2" (under the Tomcat "webapps" directory). o Both "w1" and "w2" contain (at least) a JSP which allows to upload files to the server. o Presently, the uploaded files are stored: - in the "w1\uf1\" directory