You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Jason Pyeron <jp...@pdinc.us> on 2011/08/10 23:09:22 UTC

RE: [struts-user] Get Action method name in Struts 2.2.X

> -----Original Message-----
> From: styl9090 
> Sent: Wednesday, August 10, 2011 16:56
> Subject: [struts-user] Get Action method name in Struts 2.2.X
> 
> Hi,
> 
> I am migrating my application from Struts 2.0.X to 2.2.3. In 
> 2.0.x I used to get the struts action and method names using 
> *ActionContext.getContext().getName();*, this returns action 

Look in ActionProxy
(http://struts.apache.org/2.2.3/xwork-core/apidocs/com/opensymphony/xwork2/Actio
nProxy.html)

You will see a isMethodSpecified() and a getMethod()

Sorry, don't have much time right now to elaborate.
 

> along with method like "test!getUser", but in latest version 
> getName() does not return method, it only returns action 
> name("test"). I am unable to find any method/class to get 
> action method name.. 
> I have upgraded xwork version from 2.0.4 to 2.2.3.
> Any help in this regard greatly appreciated.

-Jason

My notes: svn diff -r1126100:1126101 && svn log -v -r1126101

--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.


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