struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Chew" <keith.c...@jungledrum.co.nz>
Subject Digester and Struts...
Date Mon, 25 Feb 2002 05:08:10 GMT
Hi

I have having a problem with the Digester package. Using Struts, I have
edited the struts-config.xml file to:

<?xml version="1.0"?>
<!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 part1 SYSTEM "file:part1.xml">
    <!ENTITY part2 SYSTEM "file:part2.xml">
    <!ENTITY part3 SYSTEM "file:part3.xml">
]>

<struts-config>
	<form-beans>
        &part1;
	</form-beans>

	<global-forwards>
        &part2;
	</global-forwards>

	<action-mappings>
        &part3;
	</action-mappings>
</struts-config>

where part1.xml, part2.xml and part3.xml are in the same folder as
struts-config.xml.

I get the exception File part1.xml cannot be found.

I have reported this to the Xerces mailing list and they said that before
parsing the file, you need to set the systemId, eg:

source.setSystemId("file:" + getServletConfig().getAbsolutePath() + "/" +
fileName);

This will allow the part1.xml, part2.xml and part3.xml to be found. Looking
at the Digester class, it does not do this. Can we fix this problem?

Keith



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message