On Sat, Aug 28, 2004 at 01:54:57PM +0530, Jitendra Agrawal wrote:
: I have a directory /home/jiten/images/.
: There are several programs updating this images folder and accessing
: it. If I move it or make it symbolic link, they will break.

Specifically, what are you trying to do?  Are you trying to serve those
images via Tomcat, i.e. through <IMG> tags in HTML?

This question came up recently.  To recap:

Java webapps they are meant to be self-contained applications.  Serving
files outside of the context area will take more than a symlink. =)
Specifically, the servlet spec doesn't deal with symlinks because
they're OS-specific and there's no way to follow them from inside a WAR
file.

If the images are static and you're in a development cycle, just get
used to all apps having copies of the images.  You'll spare yourself the
headache of trying to get around this "limitation" of the spec.

Addendum:

If the images are being dynamically updated, say, by an external
program: you could a servlet that loads the images from outside the
context area.  That would involve:

1/ having all relevant <IMG> tags refer to this servlet

2/ setting up the servlet to know where the images are on-disk

3/ having the servlet set the content-type and other related headers,
then open the file and stream it out to the client.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to