I think this case gets a little more complicated because you want the timer data to be available to your result. If you simply wait for your call to ActionInvocation.invoke() to return, then your result will already have been processed. So you need to use your interceptor to set a PreResultListener on the ActionInvokation, which will catch a signal between the completion of the action and the processing of the result. This listener can be an inner class of your interceptor which can access the elapsed time and store it in the context or value stack.
John On Fri, Feb 19, 2010 at 10:15 AM, Cimballi <cimballi.cimba...@gmail.com> wrote: > Look at ParameterRemoverInterceptor for example, you can access the > action context like this : > ActionContext ac = invocation.getInvocationContext(); > > And then you can set values in the value stack. Didn't test it but should > work. > > Cimballi > > > On Fri, Feb 19, 2010 at 11:10 AM, CRANFORD, CHRIS > <chris.cranf...@setech.com> wrote: >> Is it possible to set a value in the request or valuestack from an >> interceptor that contains the total time it took for the action to be >> invoked and executed? I have a requirement to show this on the JSP page >> and didn't know if I could do this within the Interceptor or if I have >> to do this in my base action object. >> >> Chris >> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org