struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Musachy Barroso <>
Subject Re: studying struts2 framework, ActionInvocation question
Date Wed, 22 Jul 2009 21:17:50 GMT
The best way to find out all these things is to put breakpoints in the
constructor and/or the setter methods.


On Wed, Jul 22, 2009 at 2:05 PM, Dimitrios
Christodoulakis<> wrote:
> Hello,
> According to the XWork feature description,
>, the
> ActionInvocation represents the execution state of an action holding
> the action instance and the interceptors.
> I have been looking at
> and examining an
> implementation of the ActionInvocation interface:
> DefaultActionInvocation and was wondering how does this class gets a
> hold of the action instance and the interceptors? It has relevant
> fields like action, interceptors and proxy with getters for the action
> and the proxy. But it is not straightforward to me how the action
> instance (and the interceptors) are injected to it.. I didn't see
> setter methods for the action.
> My motivation for this question comes also from wanting to unit test
> an interceptor's intercept(ActionInvocation actionInvocation) method.
> I will need to pass an ActionInvocation as a parameter, which then the
> interceptor will use to extract the actual action instance from.
> (Among other things, like the InvocationContext to get the session).
> So I was also wondering how to provide a mock-type of an
> ActionInvocation which will contain a mock action, a mock session etc.
> I mean I understand how to create a mock action and a mock session map
> with some parameters in it, but how do I bind those to a mock
> ActionInvocation? Would I need perhaps to start with a mock
> ActionProxy?
> Thanks for your advice. This will help me design the test case and
> also learn more about the struts2 mechanics.
> Regards!
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

"Hey you! Would you help me to carry the stone?" Pink Floyd

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message