3 Replies Latest reply on Nov 27, 2007 11:32 AM by Peter Johnson

    how to deploy an application in jboss4.2 from command prompt

    mohit gupta Newbie

      kindly explain to me how to deploy an application in jboss4.2 from command prompt

        • 1. Re: how to deploy an application in jboss4.2 from command pr
          Peter Johnson Master

          Because you used the term "command prompt", I will assume you are running Windows. Here is the command:

          copy myapp.ear %JBOSS_HOME%\server\default\deploy


          Note that JBOSS_HOME must be set to the directory where JBossAS is installed.

          • 2. Re: how to deploy an application in jboss4.2 from command pr
            mohit gupta Newbie

            hi peter...

            thanks for your reply......my problem is that when i use the command run.bat -b 0.0.0.0 the server gets started but war files present in the server\default\deploy doesnot get deployed....i am using red hat developer and when i start jboss4.2.0 from that developer...all the applications get deployed by itself but that doesnot happen when i start the server from the command prompt using the above stated command(run.bat -b 0.0.0.0)

            • 3. Re: how to deploy an application in jboss4.2 from command pr
              Peter Johnson Master

              I am sorry but I do not use Red Hat Developer. I suspect that Developer is using JMX to deploy the applications, rather than copying the files to the deploy directory, and therefore the war file is not located in the deploy directory.

              If the app server is not running, and you copy the war file to the deploy directory, and then start the app server, the app server will deploy the application. (If this is your situation and you believe the app is not being deployed, post the console log from when you started the app server, and post a 'dir' of the deploy directory.)

              If the app server is already running and you copy the war file to the deploy directory and the app does not deploy, then most likely Developer modified the app server to turn off hot deployment. You can check this by looking at the last MBean on server/default/conf/jboss-service.xml, specifically the attributes ScanPeriod and ScanEnabled.