You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by tom tom <j_...@yahoo.com> on 2007/06/26 05:05:55 UTC
Custom filter - Is this possible
Hi,
Can some one let us know, how to define a Custom
filter which would do what the
org.apache.struts2.dispatcher.FilterDispatcher does
but in addition it checks a Cetain attribute (e.g.
Window State) and shows nothing if a certain criteria
is met.
Is this something possible.? or How can I have
pluggable such configuration which does what I want
but also preserving the functionality.
Thanks,
____________________________________________________________________________________
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.
http://new.toolbar.yahoo.com/toolbar/features/norton/index.php
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Custom filter - Is this possible
Posted by Laurie Harper <la...@holoweb.net>.
tom tom wrote:
> Hi,
>
> Can some one let us know, how to define a Custom
> filter which would do what the
> org.apache.struts2.dispatcher.FilterDispatcher does
> but in addition it checks a Cetain attribute (e.g.
> Window State) and shows nothing if a certain criteria
> is met.
>
> Is this something possible.? or How can I have
> pluggable such configuration which does what I want
> but also preserving the functionality.
You don't extend the existing filter, you wrap it. Create a new filter
which implements the decision logic you need. Your filter will simply
skip forwarding the request to the next filter in the filter chain if
your criterion is met. Make sure you map your filter ahead of
FilterDispatcher, so it gets control first.
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org