-
1. Re: Publish a folder into JBoss 5.1
vphanibhushanreddy Apr 17, 2012 10:51 AM (in response to aka_karter)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
<value>${jboss.server.base.url}external</value>
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
aka_karter Apr 17, 2012 2:15 PM (in response to vphanibhushanreddy)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
<value>${jboss.server.home.url}documents</value>
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
vphanibhushanreddy Apr 18, 2012 12:44 PM (in response to aka_karter)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:
- Edit JBOSS_HOME/server/default/conf/bootstrap/profile.xml like below by searching 'java.net.URI':
<list elementClass="java.net.URI">
<value>${jboss.server.home.url}deploy</value>
<value>${jboss.server.home.url}../../../static/content/</value>
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
aka_karter Apr 20, 2012 11:50 AM (in response to vphanibhushanreddy)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
vphanibhushanreddy Apr 20, 2012 11:52 AM (in response to aka_karter)Very nice to hear !!!