You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by George Dadulescu <se...@gmail.com> on 2007/11/30 13:27:19 UTC
Get the list of all action names defined in struts.xml
Hi.
Is there any possibility to get the list of all the action names defined in
struts.xml ?
Struts must have a map or something where it keeps all the action names I
presume ...
Thanks.
George
--
View this message in context: http://www.nabble.com/Get-the-list-of-all-action-names-defined-in-struts.xml-tf4904545.html#a14047033
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Get the list of all action names defined in struts.xml
Posted by George Dadulescu <se...@gmail.com>.
Thanks for the help. It did point me in the good direction. Here is the
answer:
RuntimeConfiguration runtimeConfiguration =
Dispatcher.getInstance().getConfigurationManager().getConfiguration().getRuntimeConfiguration();
Map actionConfigs = runtimeConfiguration.getActionConfigs();
Gary Affonso wrote:
>
> George Dadulescu wrote:
>> Hi.
>> Is there any possibility to get the list of all the action names defined
>> in
>> struts.xml ?
>
> It's in the RunTimeConfiguration. Something like...
>
>
> RuntimeConfiguration runtimeConfiguration =
> ConfigurationManager.getConfiguration().getRuntimeConfiguration();
>
> ActionConfig actionConfig =
> runtimeConfiguration.getActionConfig("",
> actionInvocation.getInvocationContext().getName());
>
>
> The above is a copy-and-paste from a WebWork app, might need some
> tweaking for S2. But it should get you pointed in the right direction.
>
> - Gary
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/Get-the-list-of-all-action-names-defined-in-struts.xml-tf4904545.html#a14103263
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Get the list of all action names defined in struts.xml
Posted by Gary Affonso <gl...@greywether.com>.
George Dadulescu wrote:
> Hi.
> Is there any possibility to get the list of all the action names defined in
> struts.xml ?
It's in the RunTimeConfiguration. Something like...
RuntimeConfiguration runtimeConfiguration =
ConfigurationManager.getConfiguration().getRuntimeConfiguration();
ActionConfig actionConfig =
runtimeConfiguration.getActionConfig("",
actionInvocation.getInvocationContext().getName());
The above is a copy-and-paste from a WebWork app, might need some
tweaking for S2. But it should get you pointed in the right direction.
- Gary
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org