Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

Re: Get the list of all action names defined in struts.xml

George Dadulescu

2007-12-01



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@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
>

--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.