Deploying war outside of the jboss deployment directory

Hey. I am trying to deploy a war file outside of the deployment folder in jboss. I changed context.xml with the following content:

<Context docBase="C:\Apps\foo.war" reloadable="true" privileged="true" antiResourceLocking="false" path="/"></Context> 

The context file is located inside jboss-5.1.0.GA \ server \ default \ deploy \ jbossweb.sar \ in 5.1.0.GA and jboss-4.2.3.GA \ server \ default \ deploy \ jboss-web.deployer \ in 4.2.3.GA.

This is what I thought would be the only change. But does not work. Can someone please tell me which other files I need to change?

Thanks.

+6
java jboss
source share
3 answers

I found out that I had to add the directory location in jboss-service.xml:

 <attribute name="URLs">deploy/, file:\C:\Apps\foo.war</attribute> 

This was on windows and jboss.4.2.3.GA, and the application was successfully deployed and accessible via http: // localhost: 8080 / foo .

Thanks.

+4
source share

For JBoss 5, you need to add your custom deployment URLs to the bootstrap profile service .

Remember, JBoss 5 uses the vfs level, which requires you to add your own deployment location to the constant root list in conf / bootstrap / vfs.xml if you want to avoid filling up the disk space with duplicated exploded banks. In addition, some versions of the vfs version do not correctly recognize literals for deployment, so you may need to use bean injection .

+3
source share

To deploy a web application outside of the deployment directory, you need to modify profile.xml
See bean BootstrapProfileFactory and applicationURI properties.

  <property name="applicationURIs"> <list elementClass="java.net.URI"> <value>${jboss.server.home.url}deploy</value> <value>...directory outside of deploy dir...</value> </list> </property> 
+1
source share

All Articles