This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
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
Similar Threads
Need help for refreshing the page
interceptor not working in struts 2
Interceptors in Struts 2
Get the exception object into Interceptor