Can't you use a generic way like in web.xml instead :
<aTagName> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> ... </aTagName> aTagName is replaced by the concerned configuration (requestProcessor, actionServlet, ...). In this way, we can have a generic DTD that can fit any future extensions requesting configuration parameters. I think of something like that for the Tiles initialization from struts-config files. Use of new DTDs is more user friendly, but need to update extended DTDs when the struts one is modified. Another approach that I haven't check yet is the use of namespaces in XML files. Can we have one DTD for each namespace in a single XML file ? If answer is yes and digester support it, this could solve the "extension" problem. Discussion is open ... Cedric Oleg V Alexeev wrote: > Hello, > > [PREFACE] > > Now I try to integrate commons-services and struts. New version of > the ActionServlet - ActionServicesServlet - uses additional elements > in struts-config file to configure ServiceManager. To solve problem > with *.dtd file I write my version of struts-config_1_1.dtd file - > struts-config_1_1_services.dtd, which contains all elements needed > to process ServiceManager config tags and add description for this > resource to the registrations array in my version of ActionServlet - > > protected String registrations[] = { > "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN", > "/org/apache/struts/resources/struts-config_1_0.dtd", > "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN", > "/org/apache/struts/resources/struts-config_1_1.dtd", > -> "-//Apache Software Foundation//DTD Struts Configuration 1.1 with Services >1.0//EN", > -> "/org/apache/struts/resources/struts-config_1_1_services.dtd", > "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN", > "/org/apache/struts/resources/web-app_2_2.dtd", > "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN", > "/org/apache/struts/resources/web-app_2_3.dtd" > }; > > I try to start application, drived by ActionServicesServlet - all > new config tags are ignored and Catalina console is full of > exceptions from SAX. > > [PROPOSAL] > > Can we refactor ActionServlet to support extensible model for > registrations? For example - add method, which returns Vector, > array or Map of registrations. So every class, extended from > ActionServlet can add its own *.dtd files and work with extended > version of the config file. > > -- > Best regards, > Oleg 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]>