In my opinion, the services should be configured through their own XML file,
rather than through struts-config.xml. This fits in better with the services
manager as an independent component. It also allows it to register its own
DTD(s) with its own Digester instance before parsing the config file(s).

This is actually what I am doing with my own (very minimal) services
manager. It makes the changes to ActionServlet (in the subclass) trivial,
and means that the services manager has no dependencies on anything else for
parsing its configuration (other than that somebody call it, of course).

--
Martin Cooper


----- Original Message -----
From: "Oleg V Alexeev" <[EMAIL PROTECTED]>
To: "Struts Developers List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 05, 2002 5:34 AM
Subject: [PROPOSAL] Extensible set of resource registrations.


> 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]>

Reply via email to