1 Reply Latest reply on Oct 26, 2012 4:38 PM by nickarls

    Serving static files from JBoss AS7

    dspiess

      Hi,

       

      I'm trying to figure out how to configure JBoss to allow a directory with static files.  I tried creating a directory in deployments called test, adding a file, and then trying to get the file back via http://localhost:8080/test/testfile.txt 

       

      It didn't work.

       

      I know I could bundle the file into a empty war, but we need to add and remove files from the directory continuously.  What I'd like is to have a directory that I can add files to, and then be able to refernce the added file read only via http://localhost:8080/test/testfile.txt

       

      How do I configure this in JBoss AS 7?

       

      Thanks!

        • 1. Re: Serving static files from JBoss AS7
          nickarls

          Make a dir named test.war, and in that make a WEB-INF dir and in that place a well formed (empty) web.xml.

          Now you should have a deployable war, in which you can place your files.

          Not so sure it's the most elegant solution but they should be accessible.

          Depending on your AS version, you might also have to make a dodeploy marker file, check the docs.