7 Replies Latest reply on Feb 4, 2009 6:12 AM by jaikiran pai

    JBoss 4.2 Context.xml docBase ignored?

    David Mark Newbie

      Hi all,

      We would like to deploy a web context with path "/adad". To do this we placed a directory adad.war/ in jboss/server/default/deploy/, which deployed fine. However we want this web context to serve actual files from elsewhere, as can be done in Tomcat using docBase. To do this we created a "context.xml" file in the WEB-INF directory of "adad.war", as follows:

      <?xml version="1.0"?>
      <Context docBase="/srv/images" debug="99" reloadable="true" override="true">

      We know JBoss is parsing this context.xml file, as it honours certain attributes. However it never honours the "docBase" instruction, preferring instead to map "localhost:8080/adad/" to the directory inside "adad.war/", instead of the directory "/srv/images" that it is being instructed to serve from...

      Any ideas on how to make JBoss-web serve static content files from a docBase elsewhere on the filesystem would be much appreciated!

      Many Thanks,