File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes ActionInvocation.getAction() method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionInvocation.getAction() method" Watch "ActionInvocation.getAction() method" New topic

ActionInvocation.getAction() method

MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
Assuming there is an action of type "MyAction", with a setDate(Date) method, this simple interceptor will set the date of the action to the current date:

My question here is, how does statement MyAction action = (MyAction)invocation.getAction(); will return our desired action instance named "MyAction"
I mean there might be other action instances present in ActionContext, then out of those how this interceptor will select MyAction?

I am slow but sure
I agree. Here's the link:
subject: ActionInvocation.getAction() method
jQuery in Action, 3rd edition