Dynamically add/remove servlet filters at session start

313 Views Asked by At

My JSF application uses Active directory authentication module which is JCIFS. But JCIFS filter prevents the ICEpush related things for IE8. I thought to remove the JCIFS filter (if it is possible) after the authentication. So it's session based. Can I apply a filter when a session stats and after authentication finished can I remove it from the current session ? So it won't filter any request after the current session.

Thanks.

1

There are 1 best solutions below

1
On BEST ANSWER

You cannot add or remove filters dynamically, but you could write a new filter that extends the JCIFS one and, if the session is authenticated, skips its special processing (i.e. calls chain.doFilter immediately).