0

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.

sura2k
  • 7,365
  • 13
  • 61
  • 80

1 Answers1

1

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).

Alessio Stalla
  • 1,022
  • 6
  • 22
  • This is not part of the answer per se, but can be clarifying: adding/removing filters dynamically is not supported by Servlet API (except during startup with Servlet 3.x), but even if it were, it would not help you with your use case, because filters are global (in other words, they are not tied to a single session). Removing a filter would remove it for all sessions, authenticated or not. – Alessio Stalla Jul 19 '13 at 10:34