2 Replies Latest reply on Jul 15, 2009 3:56 PM by Juergen H

    JBoss 5.1.0.GA, deployers.SARDeployer, local-directory eleme

    Juergen H Newbie

      switching from JBoss 4.0.4.GA

      I have a .sar file in deploy dir, with just static content to be copied to jboss.server.data.dir. No mbeans, no classes.

      <local-directory path="common" />

      - I wish to copy static web files to data dir to be serviced by apache http server and jboss tomcat as well (adding tomcat context to data dir content via a context xml file)
      - I don't want to copy a whole bunch of file on deployment, just single .sar (to be expanded by jboss)
      - sadly, no overwrite (so have to empty/clear data dir)

      Now, in JBoss 5.1.0.GA common.sar is deployed without any error message, just local-directory element is not processed, no data is copied/extracted to jboss data dir.

      Found nothing much in JBoss 5 docs, Google.

      Is there a way to
      A) make JBoss 5.1.0 honor local-directory elements or
      B) do the same with some other deployer (e.g. .war file deployment with a well defined target directory, not a randomly numbered one I cannot refer to in apache server conf)

      Thanks, Juergen

        • 1. Re: JBoss 5.1.0.GA, deployers.SARDeployer, local-directory e
          Juergen H Newbie

          ad. jboss-service.xml content

           <local-directory path="kussscommon" />

          • 2. Re: JBoss 5.1.0.GA, deployers.SARDeployer, local-directory e
            Juergen H Newbie

            Follow-up: appart from SARDeployer local-directory problem, I seem to be unable to make JBoss Web deploy my static context as I did in JBoss 4.0.4.GA

            in jbossweb.sar/server.xml: add to Host element

            <Host name="localhost" appBase="${jboss.server.data.dir}/empty-dir" deployOnStartup="true">

            deployOnStartup="true" to let Tomcat deploy a context as described in http://tomcat.apache.org/tomcat-5.5-doc/config/context.html:

            created: jboss/server/default/conf/jboss.web/localhost/common#pics.xml:
            <Context docBase="${jboss.server.data.dir}/common" />

            alternatively, could add Context element as child to Host element in server.xml (discouraged by tomcat docs)

            Both version do not seem to work in JBoss 5.1.0.GA / JBossWeb 2.1.3.GA any more: deployOnStartup is ignored

            Is there a way to
            A) make it work as described
            B) advise JBossWeb to publish static content from filesystem under a specific (sub)context, without creating a webapp (.war, web.xml, jboss-web.xml, ...)