You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by tekman <te...@hotmail.com> on 2008/05/26 08:43:51 UTC

jsp renders before interceptors are finished

Hi all!

I am using a custom interceptor to capture old and new value for an
attribute in my page. This interceptors doBefore method is called before the
params interceptor is called. The doAfter method is called after the action
and the other interceptors are finished.
This new and old values is displayed in a log section of the page.

Pseudocode:
doIntercept()
doBefore()
invocation.invoke()
doAfter()

The problem is that the log page starts rendering before the interceptors
doAfter method is finished, and thus, the new value for the attribute is not
set
Anyone knows how to solve this?

Thanks in advance!
-- 
View this message in context: http://www.nabble.com/jsp-renders-before-interceptors-are-finished-tp17466614p17466614.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: jsp renders before interceptors are finished

Posted by tekman <te...@hotmail.com>.
Thanks a bunch. That worked!


Jukka Välimaa wrote:
> 
> Anything done after invoke will happen after the result is rendered. You
> need to add a
> PreresultListener<http://struts.apache.org/2.0.6/docs/preresultlistener.html>before
> calling invoke(). Put the functionality you need in the
> preresultlisteners beforeResult method.
> 
> On Mon, May 26, 2008 at 9:43 AM, tekman <te...@hotmail.com> wrote:
> 
>>
>> Hi all!
>>
>> I am using a custom interceptor to capture old and new value for an
>> attribute in my page. This interceptors doBefore method is called before
>> the
>> params interceptor is called. The doAfter method is called after the
>> action
>> and the other interceptors are finished.
>> This new and old values is displayed in a log section of the page.
>>
>> Pseudocode:
>> doIntercept()
>> doBefore()
>> invocation.invoke()
>> doAfter()
>>
>> The problem is that the log page starts rendering before the interceptors
>> doAfter method is finished, and thus, the new value for the attribute is
>> not
>> set
>> Anyone knows how to solve this?
>>
>> Thanks in advance!
>> --
>> View this message in context:
>> http://www.nabble.com/jsp-renders-before-interceptors-are-finished-tp17466614p17466614.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/jsp-renders-before-interceptors-are-finished-tp17466614p17469332.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: jsp renders before interceptors are finished

Posted by Jukka Välimaa <va...@gmail.com>.
Anything done after invoke will happen after the result is rendered. You
need to add a PreresultListener<http://struts.apache.org/2.0.6/docs/preresultlistener.html>before
calling invoke(). Put the functionality you need in the
preresultlisteners beforeResult method.

On Mon, May 26, 2008 at 9:43 AM, tekman <te...@hotmail.com> wrote:

>
> Hi all!
>
> I am using a custom interceptor to capture old and new value for an
> attribute in my page. This interceptors doBefore method is called before
> the
> params interceptor is called. The doAfter method is called after the action
> and the other interceptors are finished.
> This new and old values is displayed in a log section of the page.
>
> Pseudocode:
> doIntercept()
> doBefore()
> invocation.invoke()
> doAfter()
>
> The problem is that the log page starts rendering before the interceptors
> doAfter method is finished, and thus, the new value for the attribute is
> not
> set
> Anyone knows how to solve this?
>
> Thanks in advance!
> --
> View this message in context:
> http://www.nabble.com/jsp-renders-before-interceptors-are-finished-tp17466614p17466614.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>