I got this to work, but my xml it at home. I can post it tomorrow but
basically, you should watch out for 2 things:
- you need xerces 1.4.4 (older versions just will not work)
- even with version 1.4.4, the relative path does not work, you need to give
an absolute path:

<!ENTITY incl1 SYSTEM "file:c:\projects\webapp\incl1.xml">

Give that a go. I am sure it'll work.

I di report this problem to Xerces, but they claim it's the Digester that is
not doing things correctly. I then reported it to "commons", but no answers.

At the end, this was not resolved.

Keith




-----Original Message-----
From: Bryan P. Glennon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 20 March 2002 2:57 p.m.
To: Struts Users Mailing List
Subject: RE: struts-config and include


Steve -
    I tried that, having done it successfully in ant. I get the
following exceptions, however, when I try it in structs-config:

avax.servlet.ServletException: Parsing error processing resource path
/WEB-INF/struts-config.xml
        at
org.apache.struts.action.ActionServlet.initMapping(ActionServlet.java:13
36)
        at
org.apache.struts.action.ActionServlet.init(ActionServlet.java:465)
<snip>
----- Root Cause -----
java.lang.NullPointerException:
        at
org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1094)
        at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
<snip>

The XML is valid (according to Turbo XML):
<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration
1.0//EN"
          "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd";[
<!ENTITY incl1 SYSTEM "incl1.xml">
]>

Based on other threads I've seen here, I might be SOL. Any ideas?

Thanks,
Bryan



--
Bryan Glennon (mailto:[EMAIL PROTECTED])
BPG Consulting, Inc. (http://www.bpgc.com)
Tech Question? (mailto:[EMAIL PROTECTED])


-----Original Message-----
From: Steve Wilkinson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, March 19, 2002 6:25 PM
To: Struts user
Subject: Re: struts-config and include


http://jakarta.apache.org/ant/ant_in_anger.html

This tells you how to do an XML document include inside another XML
document.  I believe you could do this with the struts-config.xml?  It
under Tips and Tricks.

Steve


----- Original Message -----
From: Bryan P. Glennon
Sent: Tuesday, March 19, 2002 10:02 AM
To: [EMAIL PROTECTED]
Subject: struts-config and include

Is there a way to include another XML file within the struts-config
file? I have tried using entity references but they always fail (null
pointer exception when struts-config is being parsed.) The file is
getting a big large and I want to split it into several smaller ones.
Any ideas?

Thanks,
Bryan

--
Bryan Glennon (mailto:[EMAIL PROTECTED])
BPG Consulting, Inc. (http://www.bpgc.com)
Tech Question? (mailto:[EMAIL PROTECTED])

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to