2 Replies Latest reply on May 16, 2010 9:59 AM by Richard Qin

    Deploying static images in JBoss 5.1 with profile.xml

    Bob Muller Novice

      I've followed the directions at http://community.jboss.org/wiki/HowtodeploymyapplicationinanexternaldirectoryinJBoss-5 to set up a "static" web app that will serve up a collection of image files to my other web apps.


      1. I modified profile.xml to add /opt/jboss/server/static/deploy as a deployment directory.

      2. I added srv.war as a directory (/opt/jboss/server/static/deploy/srv.war) and put an empty web.xml in a WEB-INF subdirectory.

      3. I created symbolic links under srv.war for the various image directories (images1, images2).


      The JBoss server starts up fine and shows /srv as a deployed war file in the jmx-console. However, I can't seem to get to the image files, I just get a 404 message for /srv/images1/xxx.png, for example. I can see the files are "there" in the linked sense but the web server doesn't seem to find them.


      There's also a wrinkle that I'd like to ask about. I'm using virtual hosts with a jboss-web.xml in my other web apps. When I refer to "/srv/images1" it uses the virtual host name (http://bob:8080/srv/images1), which won't be found either. I don't think srv can be deployed with a virtual host, right?


      So why can't I see http://localhost:8080/srv/images1/xxxx.png?


        --Bob Muller