Take a look at PreResultListener

http://struts.apache.org/2.x/docs/preresultlistener.html


Lukasz Lenart wrote:
> 
> 2009/2/9 Prasad Mangina <pra...@constructiondeal.com>:
>> Dear All,
>>
>> i have programmed a simple (custom) interceptor.
>>
>> ....placed logic in post action invocation.
>>
>> public String doIntercept(ActionInvocation invocation) throws Exception {
>>
>>    Object action = invocation.getAction();
>>
>>    String ret = invocation.invoke();
>>
>>    if (action instanceof MyAware) {
>>
>>            ((MyAware) action).callme();
>>
>>    }
>>
>>    return ret;
>>
>> }
>>
>> ....in Action's "callme()" method, I am setting action's var (this var
>> has
>> getter and setter).
>>
>> In my velocity vm file, I am accessing this action's var.
>>
>> $myvar
>>
>> By default, the action's property would be placed in valuestack and,
>> could
>> be accessed from velocity page.
>>
>> Hmmm, this is not showing up in the velocity page.
>>
>> If, this is in pre action invocation, $myvar 's value gets displayed .
>> Only,
>> when this goes into post action invocation, it is not showing up...
>>
>> Any clues?
> 
> After you call invoke(), result (jsp, vm, etc) was already generated,
> that because your call to callme() is not working
> 
> 
> Regards
> -- 
> Lukasz
> http://www.lenart.org.pl/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Struts-2.1.6---custom-interceptor-tp21910825p21918703.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to