1 Reply Latest reply on Sep 21, 2006 8:49 AM by Ran Biron

    External entities in web.xml referencing xml files are resol

    Ran Biron Newbie

      I've been trying to use external entities to split my web.xml file to several parts.

      It woul've looked something like this:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE web-app
       PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
       <!ENTITY myweblet SYSTEM "weblet.xml">
      <web-app version="2.4"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >


      both web.xml and weblet.xml are in WEB-INF (of course).

      I've managed to deploy the application, but at the first time I try to access it (any servlet, whether it's the external or "regular" one) I get this exception:

      2006-09-20 16:41:56,159 [ScannerThread] (Log4JLogger.java:119) ERROR - The /WEB-INF/web.xml was not found.
      java.io.FileNotFoundException: C:\JBOSS\EJBContainer\bin\weblet.xml
       at org.jboss.net.protocol.file.FileURLConnection.connect(FileURLConnection.java:94)
       at org.jboss.net.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:103)
       at org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
       at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)
       at org.apache.xerces.impl.XMLEntityManager.startEntity(Unknown Source)

      full exception at http://pastebin.ca/178615

      It looks like jboss resolver is trying the jboss.home.dir instead of the application WEB-INF dir. I've tried all kind of combinations but every legal one causes this exception.

      Is there a solution for this? Am I doing something terribly wrong?
      Please help.