2 Replies Latest reply on Nov 11, 2005 11:29 AM by john willemin

    Using external entities in JBoss configuration files

    john willemin Newbie

      So, in order to break big xml configuration files apart, we do the exteral entity thing, like so:

      http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=31&t=002888

      For instance:

      meh.xml:
      <?xml version='1.0' encoding='utf-8'?>
      <!DOCTYPE meh[ <!ENTITY meh-message SYSTEM
      'file:./meh-message.xml'> ]>

      &meh;


      meh-message.xml:
      <meh-message>MEH!</meh-message>

      This seems to work fine in some JBoss files (like in /conf, login-config.xml) but if I try to do it with anything in server/default/deploy (oracle-ds.xml for instance) or inside my web application (WEB-INF/conf/whatever.xml) I get a FileNotFoundException for the included piece (meh-message.xml).

      It does however, work fine if I put an absolute path (i.e. !ENTITY meh-message SYSTEM 'file:c:/meh-message.xml'). For obvious reasons this is not desirable :)

      Is this a bug? It would make configuring our app so much easier if this worked.

      Thanks,
      John Willemin