I have in my webapp a functionality that allows clients to upload image files. As my webapp is deployed in an ear file I cant upload the image to the webapp...
I currently upload the image to some other folder on the server. The thing is I want to show my clients a list of links to the uploaded images.
What is the correct way to do that? and How?
1) Deploy your application as an exploded directory (http://wiki.jboss.org/wiki/Wiki.jsp?page=ExplodedDeployment ). Then your code can upload files into one of the directories within your app.
2) Place the images into a subdirectory of the server/default/data directory. You can use the jboss.server.data.dir system property to locate the data directory.