On Aug 5, 11:10 am, getsanjay.sha...@gmail.com wrote:
> *** I apologize if this is a duplicate thread since I am having
> problems with my ISP***
[quoted text clipped - 14 lines]
> for running project, I have to enter the image in the WAR file but
> have no idea on how to do that.
Its been my experience that the WAR file is exploded and then
"forgotten" about. You generally don't want to dynamically update
these files.
> Also I have a host of options when it comes to serving the images back
> to the client but I am really confused as to which one is the more
[quoted text clipped - 23 lines]
> Thanks and regards,
> S T S.
I'm not sure about JBoss, but I know that Resin can serve actual
files, not just JSP/Servlets. Just figure out the absolute path to
that directory, and save the files there. That way you can just use
an <img src="/path/to/image.png"/>
Where I work, we generally put uploaded images into a docroot that is
served by Apache, and we also have Apache reverse-proxy to our webapp
containers.
For our higher-volume (requests per second) upload sites, we store
them into a specially created image/video file system. The whole
architecture is far to complicated to get into here, and I'm not sure
if its proprietary to my employer or not, so I won't expand on it.
Hope this helps,
DAniel.
getsanjay.sharma@gmail.com - 06 Aug 2007 18:09 GMT
> On Aug 5, 11:10 am, getsanjay.sha...@gmail.com wrote:
>
[quoted text clipped - 65 lines]
> Hope this helps,
> DAniel.
Thanks a lot Daniel, I do realize that your architecture is
proprietary but still thanks for the tip. But the problem here is that
I am using JBoss(not Resin) and I have always thought that hardcoding
the image path would be a *bad* programming practice.
I tried various ways of storing the image in terms of the relative
path of the application but it just ends up in the JBoss directory. I
tried different 'getPath...' methods of request, response but failed
to get the path of the application.
This feat of handling of uploaded files and which approach to follow
is turning out to be a real feat for me. I guess its a limitation of
the WAR file that images can _never_ be stored in the root folder. :(
Any ideas would be appreciated.
Thanks and regards,
S T S
Daniel Pitts - 06 Aug 2007 20:24 GMT
On Aug 6, 10:09 am, getsanjay.sha...@gmail.com wrote:
> > On Aug 5, 11:10 am, getsanjay.sha...@gmail.com wrote:
>
[quoted text clipped - 84 lines]
> Thanks and regards,
> S T S
I really don't know about JBoss. you might look at there
documentation on how to serve flat files.