5 Replies Latest reply on Apr 20, 2012 11:52 AM by vphanibhushanreddy

    Publish a folder into JBoss 5.1


      Hi guys.. i want to know how to publish a folder in Jboss 5.1, i want to do this because i have an iframe that needs to load a lot of documents, so those documents will be in this folder i will create inside jboss( dont know exactly where, hope you can guide me).

      So basically i will have something like this <iframe src="http://localhost:8080/my_folder/mydoc.pdf"></iframe>.


      PS: i have to do this because i cant use local source in the source of the iframe, due the new security rules that browsers have right now.


      Thanks in advance

        • 1. Re: Publish a folder into JBoss 5.1

          Please go through the link https://community.jboss.org/wiki/HowToDeployMyApplicationInAnExternalDirectoryInJBoss-5 :

          a) Create jboss-5.1.0.GA\server\external

          b) Edit  jboss-5.1.0.GA\server\default\conf\bootstrap\profile.xml by adding


              to the applicationURIs property

          3. put your files into the external directory adding .war to the context name (i.e. images.war)

          4. Try accessing the URL http://localhost:8080/images

          • 2. Re: Publish a folder into JBoss 5.1

            thanks for your answer.. but i cant make it yet...here it is what i did

            1-. In /jboss-eap-5.1/jboss-as/server/default i create a folder documents (with read and write permissions),

            2-. Then i edited profile.xml  i adding


            3-. Added the .pdf's inside documents folder

            4-. Restarted jboss,


            The problem is when i try to access to http://localhost:8080/documents jboss gives me an error that the resource is not available


            PS: i didnt get it when you said "adding .war" to the context name , you mean creating another folder inside my documents folder with .war extension and inside this folder add my documents ???


            thank you

            • 3. Re: Publish a folder into JBoss 5.1

              Well actually I tried debugging to see why it wasn't working. At the end of the day I figured out to make it work.


              Following are the changes to be done:

              1.   Edit JBOSS_HOME/server/default/conf/bootstrap/profile.xml like below by searching 'java.net.URI':


                           <list elementClass="java.net.URI">



                 2.   Please make sure that  your paths are relative to JBOSS configuration parameters. I tried giving absolute paths, but it didn't work out.

                 3.   Edit JBOSS_HOME/server/default/deploy/jbossweb.sar/context.xml with allowLinking="true" attribute in <Context> tag.

                 3.   Your images/documents would be under the content folder.

                 4.   Now try accessing http://localhost:8080/content


              Above steps should work no matter what. Please let me know if any issues.

              • 4. Re: Publish a folder into JBoss 5.1

                my friend .. sorry for my late response.. it worked !!!

                thank you very much for your help

                • 5. Re: Publish a folder into JBoss 5.1

                  Very nice to hear !!!