David
From: "Peter A. Pilgrim" <[EMAIL PROTECTED]> Reply-To: "Struts Developers List" <[EMAIL PROTECTED]> To: Struts Developers List <[EMAIL PROTECTED]> Subject: Re: Forcing or replacing a request processor version 1.1 beta3 Date: Wed, 12 Feb 2003 00:52:51 +0000David Graham wrote:Why you don't want to set the RequestProcessor in the struts-config.xml file?
David
Because I want to distribute Expresso Framework with the custom request processor as standard. Does that answer the question? Of course XML config works.From: "Peter A. Pilgrim" <[EMAIL PROTECTED]> Reply-To: "Struts Developers List" <[EMAIL PROTECTED]> To: Struts Dev <[EMAIL PROTECTED]> Subject: Forcing or replacing a request processor version 1.1 beta3 Date: Wed, 12 Feb 2003 00:02:59 +0000 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]
_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-- 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]
_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]