Hi

I am looking at the Struts source code. I want to find
out the ActionServlet that is responsible for loading
and setting the RequestProcessor.

I see a ControllerConfig in the utility with the default
"org.apache.struts.action.RequestProcessor". Is there
a way of overriding this hard setting programmatical?
I want to create an ActionServlet subclass that will
default to a CustomRequestProcessor without having
to set it in XML config.

Also in the `ActionServlet.initModuleConfig' which
I think is responsible for initialisation all
the module configuration from the XML I was thinking
I could do something like this:


        // Parse the configuration for this module
        ModuleConfig config = null;
        InputStream input = null;
        String mapping = null;
        try {
            //@todo & FIXME replace with a FactoryMethod
            ModuleConfigFactory factoryObject =
                ModuleConfigFactory.createFactory();
            config = factoryObject.createModuleConfig(prefix);


ControllerConfig cc =
	moduleConfig.getControllerConfig();
if ( cc.getProcessorClass().equals(
	"org.apache.struts.action.RequestProcessor" ) )
	cc.setProcessorClass("com.xenonsoft.fire.MyCustomProcessor");

Is this a good idea?

Tia

--
Peter Pilgrim
           __ _____ _____ _____
          / //__  // ___// ___/   +  Serverside Java
         / /___/ // /__ / /__     +  Struts
        / // ___// ___// ___/     +  Expresso Committer
     __/ // /__ / /__ / /__       +  Independent Contractor
    /___//____//____//____/       +  Intrinsic Motivation
On Line Resume
   ||
   \\===>  `` http://www.xenonsoft.demon.co.uk/no-it-striker.html ''


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

Reply via email to