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 /WebApp/files/filename.jpg so
far. But that should be a quick fix.

Anyhow, the path is stored in a context-param so all I need to do to port
the application is set the path in the web.xml and set the policies to allow
read/write access.

And yes, i create subdirectories for each user and each picture will get a
random file name.
Since I maintain user objects which organize all the pictures each user
uploads, it's no problem to find it again.
Since this is only a test project for University, this stays in-memory, but
apparenty, for a real deployment, the whole thing will be done with JDBC.

But again, thanks for your help, recommendations and advices

Robert

Reply via email to