Image Prblem on linux server

Hi,

In my project i want to display images present on server(linux). I am not getting how can i give path for that image to display it in jsp page.Previously i given path of folder where actual image is present(on linux).and then by getAbsolutePath() for that image.But not succeed. I tried relative path for my application but if we deploy this as an EAR then i am getting null relative path .

After displaying image on jsp i have to modify this image(zoomin,zoomout etc.)

Is there any file access issue for linux.Is anybody have sample code please post it.

Actual i want to used image server concept in my project to store image on another machine.If anybody have implement this concept can u please post sample code for this problem.

Tools i am using-Eclipse,linux is server,weblogic8.1

It's very urgent.

Thanks in Advance

[875 byte] By [AP_javaa] at [2007-11-27 8:57:04]
# 1

I've not really understood what you were trying to say but I think it's this: you want to be able to serve images.

I don't know about getAbsolutePath() but getRealPath() does not work with archived apps ( .war or .ear ) and so you'll get a null in those cases. Perhaps it's a similar reason, since the container ( if you've not set it to decompress wars/ears ) will run the app in a 'virtual' way.

What you could do is have an images folder where all your images will get stored and then you only need the relative path '/images/imagename.jpg' to fetch the image with name imagename.jpg.

But, this will not scale very wel, l I think and also, organization and creating sub-folders will be a problem.

Have you considered saving the images in a database? Is that a feasible option for you? I recently tried this out and it seemed easy enough to get a skeleton servlet in place to serve the images from the database.

There's also one image servlet by BalusC, a member of this forum, over at http://balusc.xs4all.nl/srv/dev-jep-img.html. It's kinda complicated since it's pretty much full-fledged so if you haven't worked with this before, I'd suggest you start a little smaller. But it seems to cover pretty much all the stuff you'd need so it'd be good to go through the code once you get an idea.

nogoodatcodinga at 2007-7-12 21:21:04 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...