You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Vinod Singh <vi...@agreeya.com> on 2007/08/07 11:35:36 UTC

Extending ActionConfig in Struts2

Hi All,

The Struts 1.x provides a facility to extend the ActionMapping by 
defining it in web.xml in following manner-

    <init-param>
        <param-name>mapping</param-name>
        <param-value>CustomActionMapping</param-value>
    </init-param>

In Struts 2.x I don't see anyway to extend ActionConfig.

The ActionConfig class is hard coded in addAction(...) method of 
com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.

Can anyone guide me in extending ActionConfig, if I am missing something?

Thanks,

Vinod

Re: Extending ActionConfig in Struts2

Posted by Don Brown <do...@gmail.com>.
The bigger question is why you would want to do this.  In Struts 1, it
was one of the few ways to pass configuration information to an
Action.  In Struts 2, you can pass values directly to an action via
setters, which is a better solution imo.

Don

On 8/9/07, Ian Roughley <ia...@fdar.com> wrote:
> Have you tried overriding the struts.configuration property with a new
> Confguration class that builds and returns your new ActionConfig?
>
>
> Vinod Singh wrote:
> > Any clues??
> >
> > Thanks,
> >
> > Vinod
> > -------- Original Message --------
> > Subject: Extending ActionConfig in Struts2
> > From: Vinod Singh <vi...@agreeya.com>
> > To: user@struts.apache.org <us...@struts.apache.org>
> > Date: Tuesday, August 07, 2007 3:05:36 PM
> >> Hi All,
> >>
> >> The Struts 1.x provides a facility to extend the ActionMapping by
> >> defining it in web.xml in following manner-
> >>
> >>     <init-param>
> >>         <param-name>mapping</param-name>
> >>         <param-value>CustomActionMapping</param-value>
> >>     </init-param>
> >>
> >> In Struts 2.x I don't see anyway to extend ActionConfig.
> >>
> >> The ActionConfig class is hard coded in addAction(...) method of
> >> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.
> >>
> >> Can anyone guide me in extending ActionConfig, if I am missing
> >> something?
> >>
> >> Thanks,
> >>
> >> Vinod
> >>
> >>
> >>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Extending ActionConfig in Struts2

Posted by Ian Roughley <ia...@fdar.com>.
Have you tried overriding the struts.configuration property with a new 
Confguration class that builds and returns your new ActionConfig?


Vinod Singh wrote:
> Any clues??
>
> Thanks,
>
> Vinod
> -------- Original Message --------
> Subject: Extending ActionConfig in Struts2
> From: Vinod Singh <vi...@agreeya.com>
> To: user@struts.apache.org <us...@struts.apache.org>
> Date: Tuesday, August 07, 2007 3:05:36 PM
>> Hi All,
>>
>> The Struts 1.x provides a facility to extend the ActionMapping by
>> defining it in web.xml in following manner-
>>
>>     <init-param>
>>         <param-name>mapping</param-name>
>>         <param-value>CustomActionMapping</param-value>
>>     </init-param>
>>
>> In Struts 2.x I don't see anyway to extend ActionConfig.
>>
>> The ActionConfig class is hard coded in addAction(...) method of
>> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.
>>
>> Can anyone guide me in extending ActionConfig, if I am missing 
>> something?
>>
>> Thanks,
>>
>> Vinod
>>
>>
>>   
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Extending ActionConfig in Struts2

Posted by Vinod Singh <vi...@agreeya.com>.
Any clues??

Thanks,

Vinod
-------- Original Message --------
Subject: Extending ActionConfig in Struts2
From: Vinod Singh <vi...@agreeya.com>
To: user@struts.apache.org <us...@struts.apache.org>
Date: Tuesday, August 07, 2007 3:05:36 PM
> Hi All,
>
> The Struts 1.x provides a facility to extend the ActionMapping by
> defining it in web.xml in following manner-
>
>     <init-param>
>         <param-name>mapping</param-name>
>         <param-value>CustomActionMapping</param-value>
>     </init-param>
>
> In Struts 2.x I don't see anyway to extend ActionConfig.
>
> The ActionConfig class is hard coded in addAction(...) method of
> com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.
>
> Can anyone guide me in extending ActionConfig, if I am missing something?
>
> Thanks,
>
> Vinod
>
>
>