1 Reply Latest reply on Jun 5, 2007 9:45 AM by formica

    Dynamic External Directories

    balcerman

      Hello,

      Here:
      http://wiki.jboss.org/wiki/Wiki.jsp?page=ExternalDirectories
      you can find how to make visible files from outside of 'war'. Here's a quote:



      Serving Static External Files jboss-3.2.4 Onwards
      JBoss 3.2.4 no longer uses Tomcat 4.1.x The default web container is Tomcat5.0.x

      Note : The following two steps are a hack till JBoss WebDeployer? gets updated with support for static content.

      Step 1 : Copy a default web.xml from <JBOSS_HOME>/server/<config-name>/deploy/jbossweb-tomcat50.sar and place it in the <JBOSS_HOME>/server/<config-name>/conf directory

      Step 2 : Edit <JBOSS_HOME>/server/<config-name>/deploy/jbossweb-tomcat50.sar/server.xml and add a Context element under Host.(Step similar to standalone TC)

      <Host name="localhost" ...>
      <!-- ADD static benchmark DIRECTORY -->
      <Context path="/benchmark" appBase=""
      docBase="/home/anil/benchmark"
      debug="99" reloadable="true">
      </Context>
      ...
      </Host>

      This will enable Tomcat to serve up static content (like html, images etc) from a directory /home/anil/benchmark and the url will be "http://localhost:8080/benchmark"




      It works in a 'static' way. If I want to change the external directory name and make it still visible for JBoss, I need to restart server.


      Is there a way to change the external directory without restarting JBoss?

        • 1. Re: Dynamic External Directories
          formica

          I'm interested in this subject and I tried to follow instructions from the WIKI page, but my situation is slightly different , since I'm using Jboss 4.2
          where there is only the jboss-web.deployer war file, in which I can find a server.xml, but adding the ... to the
          configuration did not allow me to access the external directory.

          Is there something specific to Jboss Web Server that I should be aware of ?

          Andrea