Is there any way to request pipeline processo开发者_运维技巧rs in Apache Wicket? Possibly with an open-source framework that integrates with Wicket?
I want to check requests before my web pages are rendered.
In Wicket 1.4.x, you have to extend [Web]RequestCycle
, so that you an override the hook methods (onBeginRequest()
, onEndRequest()
, onAfterTargetsDetached()
, etc.), and override Application.newRequestCycle()
to return the custom class.
In Wicket 1.5.x, this mechanism has been refactored, so you can just implement the RequestCycleListener
, which provides the same hooks. This new mechanism is much better, since you can compose and reuse listeners.
In Wicket 1.4.x (don't know if this has been kept in 1.5) you have RequestCycle#onBeginRequest()
and RequestCycle#onEndRequest()
that you can override.
精彩评论