How will the images be accessed by the user? Will the web page contain links directly to the images, or will the web page contain a link to a servlet that will then access and return the image?
If the former, then you should deploy an expanded ear file (as a directory) with an expanded war file (as a directory), and create a directory within the war directory and place the images there. For example, you might place an image at ./server/xxx/deploy/myapp.ear/mysite.war/images/picture.gif. Then the URL to access it would be /images/picture.gif. Your code can locate this directory by using the jboss.server.home.dir system property, with the string ?/deploy/myapp.ear/mysite.war/images/? appended.
If the later, you could create a subdirectory under ./server/xxx/data and place images there. Your code can use the jboss.server.data.dir system property to locate the data directory and then append the subdirectory name to that.
Thanks for the respons. It's really appreciated.
By the way, my case is the former one... the images would directly be displayed on the page using the html image tag... no servlet would be used.
At the moment I'm running this application under WebLogic as exploded dir... and following the same what you mentioned (keeping the images in the webapp/images folder).
Though, I was just wondering if there is a way I can use while having the deployment as EAR file.