If I change the servlet-mapping to specify a url-pattern other than "/", I can go to that page and the image will display.
So if I have the following, I can go to http://:8080/something and I will see the image.
But if someone navigates to the root context at http://:8080/ they see a listing of the contents of my war file.
The URL pattern is to map whatever matches the pattern you specify to the servlet named Controller. Placing just a '/' for the mapping is probably not the outcome you want. Please read a servlet tutorial or get a servlet development book to work through the web.xml deployment definitions.
The default application context for your WAR is Chat, assuming that your application.xml does not have an override for this mapping. This means that the overall URL for accessing your image locally would be:
http://localhost:8080/Chat/images/pic.jpg. Note that this is within your default application context /Chat.
From your description, you appear to be overriding the default application context, moving your application to the root context. So I am assuming this is what your are doing.
With the pattern match '/something', it means that your Controller servlet is run when you access http://localhost:8080/something.
Normally a web application expects an index.html, index.htm or index.jsp to be found when you enter just the http://localhost:8080/. Otherwise, with the default settings, you will get a directory listing. The configuration for welcome files <welcome-file-list> will be explained in a good servlet tutorial. This is probably a better method for achieving what you want.
If u make ur application.xml map ur WAR To /, you should be able to achieve what you are trying to do.
Also, if u dont want the listings to be shown(on Tomcat), turn the "listings" tag to false in the <JBoss_Dist>/catalina/conf/web.xml
Thanks for the responses!
One thing I forgot to mention is that I've set the context root in jboss-web.xml as follows:
Right now I'm only planning to deploy a single app on my server. So when people to navigate to my server, I want my app to be displayed at http://, without a uri on the end (without /Chat or anything).