Re: File system resource for static content

2008-12-14 Thread André Warnier
Hi. Not a direct answer, but did you look at the webdav app ? At least for ideas. Robert Drescher wrote: [...] I want a servlet to perform file uploads and to store the files in the local filesystem. - To unsubscribe,

File system resource for static content

2008-12-14 Thread Robert Drescher
Hello users, I'm trying to find the best practice way for implementing the following: I want a servlet to perform file uploads and to store the files in the local filesystem. This part is not that hard to do as i'm currently writing into the javax.servlet.context.tempdir. The problem is that i

Re: File system resource for static content

2008-12-14 Thread Yuval Perlov
On Dec 14, 2008, at 7:17 PM, Steve Ochani wrote: Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Sun, 14 Dec 2008 12:56:17 +0100 From: Robert Drescher robert.dresc...@gmail.com To: users@tomcat.apache.org Subject:File system resource for static content Hello

Re: File system resource for static content

2008-12-14 Thread Robert Drescher
: Send reply to: Tomcat Users List users@tomcat.apache.org Date sent: Sun, 14 Dec 2008 12:56:17 +0100 From: Robert Drescher robert.dresc...@gmail.com To: users@tomcat.apache.org Subject:File system resource for static content Hello users, I'm trying to find the best

Re: File system resource for static content

2008-12-14 Thread Hassan Schroeder
On Sun, Dec 14, 2008 at 11:29 AM, Robert Drescher robert.dresc...@gmail.com wrote: In other words, if /App/Reader is my reader servlet, can I include an image into jsp with img src=/App/Reader?file=image.jpg /? Of course, it's just a URL. Better, just make it img src=/App/Reader/image.jpg /

Re: File system resource for static content

2008-12-14 Thread Yuval Perlov
to: Tomcat Users List users@tomcat.apache.org Date sent: Sun, 14 Dec 2008 12:56:17 +0100 From: Robert Drescher robert.dresc...@gmail.com To: users@tomcat.apache.org Subject:File system resource for static content Hello users, I'm trying to find the best practice way

Re: File system resource for static content

2008-12-14 Thread André Warnier
Hi. What if user-a uploads a file called abc.jpg and then user-b uploads a file called abc.jpeg ? Who wins ? Worse, they do it at the same time.. ;-) - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional

Re: File system resource for static content

2008-12-14 Thread André Warnier
André Warnier wrote: Hi. What if user-a uploads a file called abc.jpg and then user-b uploads a file called abc.jpeg ? Who wins ? Worse, they do it at the same time.. ;-) Ooops, I meant abc.jpg both times of course. - To

Re: File system resource for static content

2008-12-14 Thread Hassan Schroeder
On Sun, Dec 14, 2008 at 12:45 PM, André Warnier a...@ice-sa.com wrote: What if user-a uploads a file called abc.jpg and then user-b uploads a file called abc.jpg ? Who wins ? Hopefully, everyone wins, since the Klever Koder has checked first to be sure an existing file isn't being overwritten

Re: File system resource for static content

2008-12-14 Thread Rusty Wright
That seems like the usual race condition problem to me. Hopefully one of them will get an error, at worst, and it won't silently overwrite the file with the one from whoever won the race. André Warnier wrote: André Warnier wrote: Hi. What if user-a uploads a file called abc.jpg and then

Re: File system resource for static content

2008-12-14 Thread Peter Abramowitsch
, hsess.getId()); } Hope this gets you started. - Peter -- View this message in context: http://www.nabble.com/File-system-resource-for-static-content-tp20999639p21004662.html Sent from the Tomcat - User mailing list archive at Nabble.com

Re: File system resource for static content

2008-12-14 Thread Robert Drescher
Ok, thanks to all, I finished my Reader Servlet. I created a work dir which has to be included into the webapps.policy so that webapps can read and write to it. My reader servlet accepts a param file so far, since i haven't figured out how to do the mapping and parsing to do the

Re: File system resource for static content

2008-12-14 Thread Hassan Schroeder
On Sun, Dec 14, 2008 at 1:47 PM, Robert Drescher robert.dresc...@gmail.com wrote: My reader servlet accepts a param file so far, since i haven't figured out how to do the mapping and parsing to do the /WebApp/files/filename.jpg so far. But that should be a quick fix. see