struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm jee <tm_...@yahoo.co.uk>
Subject Re: New Struts configuration design
Date Wed, 15 Nov 2006 09:11:35 GMT
I've go ahead and re-added the fix and update WW-1489 as well. Do have a go through if you
got the time, thx.

Cheers.


Don Brown <mrdon@twdata.org> wrote: Hmm...ok.  The reason I took it out was it was initializing
the 
framework twice, but I can see how we would need it.  If you have a 
chance, please readd your fix, but try to find more explicit names for 
the dispatchers and very clearly document the logic so it is easier to 
grasp.  If you don't have time, I may be able to get to it next week.

Thanks,

Don

tm jee wrote:
>> Could you go into detail why the cleanup filter needs to initialize the 
>> dispatcher?
>>     
>
> Yup sure. :)
>
> ActionContextCleanUp and FilterDispatcher both keeps a copy of Dispatcher, and put them
in thread local only if one doesn't exists yet. The order of filters when using sitemesh would
be 
>
> 1] ActionContextCleanUp
> 2] Sitemesh Filter
> 3] Dispatcher Filter
>
> This is such that ActionContextCleanUp when present, would have the Dispatcher setup
so Sitemesh will have access to Struts2 / WebWork internals. 
>
> Previously, the logics of setting up the dispatcher (the encoding stuff etc.) are in
both FilterDispatcher and ActionContextCleanUp, the AbstractFilter moves those commons logics
to itsef such that they are not repeated in both FilterDispatcher and ActionContextCleanUp.
>
> p/s hopefully i get the logics correct. ;)
>
> rgds
>
>
>
>
> Don Brown  wrote: Yeah, I did have to put the filters back to their original state. 
I 
> found the _dispatcher and dispatcher variables really confusing and I'm 
> not sure I understand the original usecase why the cleanup filter needs 
> to have a dispatcher instance at all.  Could you go into detail why the 
> cleanup filter needs to initialize the dispatcher?
>
> Don
>
> tm jee wrote:
>   
>> Hi guys, 
>>
>> There might be a fix releated to this (https://issues.apache.org/struts/browse/WW-1489)
that seems to be broken. WW-1489 abstracted the common logic from both DispatcherFilter and
ActionContextCleanUp to an Abstract filter. With the latest commit, FilterDispatcher is put
back to its old state (plus the new DI code) and AbstractFilter was deleted. 
>>
>> I guess its ok to revert back to the old state but ActionContextCleanUp is not reverted
totally to its old state, such that it doesn't initialize Dispatcher etc. The consequence
i guess would be that sitemesh will not have access to struts2 value stack etc. Is this the
itended behaviour or am i missing something?
>>
>> Tia
>>   
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
> For additional commands, e-mail: dev-help@struts.apache.org
>
>
>
>  Send instant messages to your online friends http://uk.messenger.yahoo.com 
>   


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



 Send instant messages to your online friends http://uk.messenger.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message