You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ni...@indus.com on 2002/02/07 04:58:35 UTC
Trying to parse values using Digester for InitApplicationBeanServlet
Hi,
I am trying to write a servlet other than ActionServlet that will
initialize my application scope beans.
I intend to read a file name myconfig.xml (which is different from
struts-config.xml).
In the servlet, I instantiate a Digester and use the following:
digester.register
("-//my company//DTD Business Object Configuration 1.0//EN",
"/com/mycompany/bo/resources/myToolConfig.dtd");
I have the dtd existing in the /com/mycompany/bo/resources folder in
/WEB-INF/classes.
My doctype in the myConfig.xml is:
<!DOCTYPE boConfig PUBLIC
"-//My Company//DTD Business Object Configuration 1.0//EN"
"http://www.mycompany.com/bo/boconfig/myToolConfig.dtd">
(The URL specified is dummy and does not exist).
When I start the servlet engine, it resolves to the alternate resource.
On invoking Digester.parse(), I get a SAXException saying - "no protocol"
/com/mycompany/bo/resources/myToolConfig.dtd
Can somebody give me a clue as to where the problem might be?
Thanks,
Nitish
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>