"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
>
> On Fri, 14 Feb 2003, PILGRIM, Peter, FM wrote:
>
> > >
> > > Am I missing something, or can't you just say:
> > >
> > >   <controller processorClass="com.mycompany.MyRequestProcessor"/>
> > >
> > > and be done with it?
> >
> > Craig
> >
> > I certainly could do that and I am doing that, but I want to
> > force the custom request processor,
> > because I am package Struts as part of Expresso?
> >
>
> How about defining an ExpressoPlugIn that configures everything you need
> at startup time?  PlugIns run after the struts-config.xml file has been
> digested, but before the configuration information is frozen, so they can
> do things like:
>
>   ModuleConfig modConfig =
>     servlet.getServletContext().getAttribute(Globals.APPLICATION_KEY);
>   ControllerConfig contConfig = modConfig.getControllerConfig();
>   contConfig.setProcessorClass("com.mycompany.MyRequestProcessor");
>
> This technique can be used for pretty much any sort of modifications to
> the configured information.

However, it doesn't solve Peter's problem, it just moves it. Instead of the
customer having to set a custom request processor in their
struts-config.xml, now they have to set a plugin.

>
> Another alternative (recently added in the 1.1 tree) is to add some
> Digester rules that are included in the set used to parse
> struts-config.xml (see the "rulesets" init parameter on ActionServlet).
> If you couple that with turning validation off, you can even add
> additional configuration elements and attributes into the standard config
> file -- I think the STXX folks are planning to take advantage of this to
> define their processing pipelines inside an <action> element.

This option also moves the problem, but this time it's moved to web.xml
instead of struts-config.xml. ;-)

I really don't see a way of doing what Peter wants without modifying the
code.

--
Martin Cooper


>
> Craig




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

Reply via email to