5 Replies Latest reply on Sep 7, 2006 4:43 AM by funnyname

    Deploying an application outside \server\default\deploy

    funnyname

      Hi,
      I have an application which has to be deployed outside \server\default\deploy directory. For e.g., I have my exploded war file at C:\Program Files\myapp\www\webapps\app1 directory. Is there any way I can accomplish this? I do not want to modify the URL attibute in "conf/jboss-service.xml" since there is a possibility that this file can be modified by a third-party.

      Earlier, I used to run my app on Tomcat and I used an xml file inside /tomcat/conf/catalina/localhost/ directory to specify the context path. My app related files are in the C:\Program Files\myapp\www\webapps\app1 and I specify this path in an xml file in /tomcat/conf/catalina/localhost/ directory.

      Is there any way I can get this done with JBoss?

        • 1. Re: Deploying an application outside \server\default\deploy
          peterj

          This cannot be done for an application. You can, however, do it for static content, se http://www.jboss.com/index.html?module=bb&op=viewtopic&t=88171

          • 2. Re: Deploying an application outside \server\default\deploy
            seanmceligot

            You just need to edit conf/jboss-service.xml. Here's the description and examples right from jboss-service.xm:

            <!-- URLs are comma separated and resolve relative to the server home URL
            unless the given path is absolute. If the URL ends in "/" it is
            considered a collection and scanned, otherwise it is simply deployed;
            this follows RFC2518 convention and allows discrimination between
            collections and directories that are simply unpacked archives.

            URLs may be local (file:) or remote (http:). Scanning is supported
            for remote URLs but unpacked deployment units are not.

            Example URLs:
            deploy/
            scans ${jboss.server.url}/deploy/, which is local or remote
            depending on the URL used to boot the server
            ${jboss.server.home}/deploy/
            scans ${jboss.server.home)/deploy, which is always local
            file:/var/opt/myapp.ear
            deploy myapp.ear from a local location
            file:/var/opt/apps/
            scans the specified directory
            http://www.test.com/netboot/myapp.ear
            deploys myapp.ear from a remote location
            http://www.test.com/netboot/apps/
            scans the specified WebDAV location
            -->

            deploy/

            • 3. Re: Deploying an application outside \server\default\deploy
              funnyname

              I had already tried modifying the conf/jboss-service.xml. But it seems to always pick up the path relative to "server\default". For e.g., I made an entry -


              deploy/,file:C:/Program Files/myApp/www/webapps/app1/


              and it was searching for "C:/Program Files/myApp/www/webapps/app1/" inside the '\server\default' directory and it throws the following error -

              java.io.FileNotFoundException: C:\Program Files\jboss\4.0.2\se
              rver\default\C:/Program Files/myApp/www/webapps/app1/

              Is there any way I can specify a folder outside the JBOSS folder?

              • 4. Re: Deploying an application outside \server\default\deploy
                funnyname

                I had already tried modifying the conf/jboss-service.xml. But it seems to always pick up the path relative to "server\default". For e.g., I made an entry -


                deploy/,file:C:/Program Files/myApp/www/webapps/app1/


                and it was searching for "C:/Program Files/myApp/www/webapps/app1/" inside the '\server\default' directory and it throws the following error -

                java.io.FileNotFoundException: C:\Program Files\jboss\4.0.2\se
                rver\default\C:/Program Files/myApp/www/webapps/app1/

                Is there any way I can specify a folder outside the JBOSS folder?

                • 5. Re: Deploying an application outside \server\default\deploy
                  funnyname

                  I had already tried modifying the conf/jboss-service.xml. But it seems to always pick up the path relative to "server\default". For e.g., I made an entry -


                  deploy/,file:C:/Program Files/myApp/www/webapps/app1/


                  and it was searching for "C:/Program Files/myApp/www/webapps/app1/" inside the '\server\default' directory and it throws the following error -

                  java.io.FileNotFoundException: C:\Program Files\jboss\4.0.2\se
                  rver\default\C:/Program Files/myApp/www/webapps/app1/

                  Is there any way I can specify a folder outside the JBOSS folder?