I downloaded JBoss Application Server 5 and successfully deployed a war file. I copypasted the Hello.war which has a simple index.jsp file into
\jboss-5.1.0.GA-jdk6\jboss-5.1.0.GA\server\default\deploy
and it worked fine.
However when I used JBoss AS 7 and deployed the war file here, it did not get executed.
jboss-as-7.0.0.Final\jboss-as-7.0.0.Final\standalone\deployments
How to deploy it?
EDIT: I googled it but was not able to find info as JBoss AS 7 is relatively new.
Just copy war file to standalone/deployments/ folder, it should deploy it automatically. It'll also create your_app_name.deployed file, when your application is deployed. Also be sure that you start server with bin/standalone.sh script.
open up console and navigate to bin folder and run
Once it is up and running just copy past your war file in
Thats probably it for jboss 7.1
Actually, for the latest JBOSS 7 AS, we need a
.dodeploy
marker even for archives. So add a marker to trigger the deployment.In my case, I added a
Hello.war.deployed
file in the same directory and then everything worked fine.Hope this helps someone!
I built the following ant-task for deployment based on the jboss deployment docs:
${jboss.deploy.dir}
is set tostandalone/deployments
Read the file $AS/standalone/deployments/README.txt
for the autodeploy mode : This is done via the "auto-deploy" attributes on the deployment-scanner element in the standalone.xml configuration file:
Can you provide more info on the deployment failure? Is the application's failure to deploy triggering a .war.failed marker file?
The standalone instance Deployment folder ships with automatic deployment enabled by default. The automatic deployment mode automates the same functionality that you use with the manual mode, by using a series of marker files to indicate both the action and status of deployment to the runtime. For example, you can use the unix/linux "touch" command to create a .war.dodeploy marker file to tell the runtime to deploy the application.
It might be useful to know that there are in total five methods of deploying applications to AS7. I touched on this in another topic here : JBoss AS7 *.dodeploy files
I tend to use the Management Console for application management, but I know that the Management CLI is very popular among other uses also. Both are separate to the deployment folder processes. See how you go with the other methods to fit your needs.
If you search for "deploy" in the Admin Guide, you can see a section on the Deployment Scanner and a more general deployment section (including the CLI): https://docs.jboss.org/author/display/AS7/Admin+Guide