As far as I know EJB container does not allow to access local file system. But
web container (were all your
servlets are run) has direct access to the file system. So I advice you use the following
pattern.
- Create some directory in the application server workstation.
- Create reference to this directory in the application deployment descriptor
- Use reference to get actual directory from the servlet that actually load and store image.
It probably make deployment a little bit more complex. But I resolved the similar problem (image preview) using this pattern.