Hello: I am trying to deploy a war file outside of a deploy folder in jboss. I changed the context.xml with the following content:
<Context docBase="C:\Apps\foo.war" reloadable="true" privileged="true" antiResourceLocking="false" path="/"></Context>
The context file is 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 changes. But is not working. Can someone please tell me what other files do I have to modify?
Thanks.
If we already have the war file and we want to deploy it on JBoss, we can go to the JBoss installation directory at standalone/deployments and paste the file there.
After you configure all properties files in WAR files, you must deploy these WARs through the app server. IMPORTANT: The following configuration is same for all app servers, except the deployment paths for app servers. To deploy configured console .
Copy and paste WAR files into Tomcat's webapps directory to deploy them. Tomcat monitors this webapps directory for changes, and if it finds a new file there, it will attempt to deploy it. If you do your application build on the same machine as your Tomcat server, simply cut and paste it to begin deployment.
Deployment Modes The scanner can operate in one of two different modes, depending on whether it will directly monitor the deployment content in order to decide to deploy (or redeploy) it.
I found out that I had to add the directory location at jboss-service.xml:
<attribute name="URLs">deploy/, file:\C:\Apps\foo.war</attribute>
This being in windows and jboss.4.2.3.GA and the application was successfully deployed and accessible through http://localhost:8080/foo.
Thanks.
For JBoss 5, you need to add your custom deploy urls to the bootstrap profile service.
Be aware, JBoss 5 uses a vfs layer, which will require you to add your custom deploy location to the list of permanent roots in conf/bootstrap/vfs.xml if you want to avoid filling up your disk space with duplicate exploded jars. In addition, some versions of the vfs don't properly recognize literal deploy URLs so you may need to use bean injection.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With