struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Leland <rlel...@apache.org>
Subject Re: Using an extension of ModuleConfigImpl
Date Sat, 26 Jul 2003 16:30:34 GMT
Rob Leland wrote:

> Rob Leland wrote:
>
>> Karachiwala, Aslam wrote:
>>
>>>I do use extensions of ActionConfig & ForwardConfig.
>>>
>>>What I've done is implement a "layer" of extensions of Struts classes, in
>>>which I've added custom fields and methods that I need. I'd like to do the
>>>same for ModuleConfig. Is that even possible without tinkering with the
>>>Struts code?
>>>
> I am assuming you want to use the same extension of the ModuleConfig 
> for all modules ?
> If so then I'll see about adding a servlet parameter to set the 
> factory used.

The latest nightly build has a new ActionServlet Parameter named
'configFactory'. Set it to the factory that creates your implementation
of the ModuleConfig interface in the web.xml

-Rob

>
>
>> No, but I am really glad you brought it up !
>> When I renamed all the application config stuff to ModuleConfig and 
>> made it
>> an interface last November it was in response to the stated desire to 
>> provide
>> hierarchical modules, or module inheritance. At first I hard coded 
>> the implementation,
>> then later on a factory was provided. Since there was no immediate 
>> need the functionality
>> you need was never implemented.
>>
>> As Mike says it should be configurable from the
>> struts-config.xml file. I'll may get time to look at in the next week 
>> or so.If in the meantime you would
>> like to suggest a patch that would greatly appreciated, but not required.
>>
>> -Rob
>>
>>
>>
>>
>>>--aslam
>>>
>>>-----Original Message-----
>>>From: Mike Jasnowski [mailto:mjasnows@bea.com]
>>>Sent: Wednesday, July 23, 2003 10:41 AM
>>>To: Struts Users Mailing List
>>>Subject: RE: Using an extension of ModuleConfigImpl
>>>
>>>
>>>You can write minor extensions to some config elements like <action> and
>>><forward>. This extension class is named via the "className" attribute of
>>>those elements.
>>>
>>>-----Original Message-----
>>>From: Karachiwala, Aslam 
>>>Sent: Wednesday, July 23, 2003 10:39 AM
>>>To: Struts-users (E-mail)
>>>Subject: Using an extension of ModuleConfigImpl
>>>
>>>
>>>Hi, all.
>>>
>>>In Struts 1.1, is there a way to use one's own implementation/extension of
>>>ModuleConfig and/or ModuleConfigFactory? I couldn't find any info on how
>>>this could be done in any of the config *.xml files.
>>>
>>>If this is not configurable then an option that was suggested to me was to
>>>invoke ModuleConfigFactory.setFactoryClass() and set that to my own factory
>>>class which will create my extension of ModuleConfigImpl. If I wanted to do
>>>this then where/when should I set the factory class?
>>>
>>>--aslam
>>>
>>>
>>>  
>>>
>>
>>
>>-- 
>>Rob Leland
>>
>
>
>-- 
>Rob Leland
>


-- 
Rob Leland


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message