You must use a servlet to acess and write the image content to the client.
My advice is for you to add the images to your war, unless those images are part of a client specific repository in that case the images are dinamic so a servlet is necessary.
Thanks for your reply.
I read some of the XML files in the "conf" directory of JBOSS and came to know that I have to modify the jboss-service.xml file for "Hot Deployment", and then I did it.
Modify the following tag in the jboss-service.xml file:
attribute name="URLs" with the following value....
I had "images.war" under "/var/myapp". First, JBOSS searches for .war and .ear files under the usual "deploy" directory and if "images.war" is not available, then it will search the "/var/myapp" directory. And it found out the images.war under "/var/myapp".
Now, my problem is fixed.