Hassan Schroeder wrote:
On Fri, Aug 1, 2008 at 1:39 PM, André Warnier <[EMAIL PROTECTED]> wrote:
Can one dynamically disable a servlet filter under some conditions, from
within another preceding filter ?
You could /probably/ -- untested conjecture -- break the FilterChain at
that point by forwarding to a URL for which Filter B wasn't applied (or
was applied only to a REQUEST rather than FORWARD.
On second read, can you elaborate on that one ?
Do I understand correctly, as follows ?
Originally, I have for the servlet a <url-pattern> like, for instance
<url-pattern>*.xyz</url-pattern>
and I have for filter B (the one to disable) a
<servlet-name>servletX</servlet-name>
I would
a) replace this last by a <url-pattern>*.xyz</url-pattern>
b) make filter A, in case it doesn't want filter B to run, change the
request URL to, e.g., "something.abc", so that filter B does not run
anymore.
c) change the servlet def. so that it handles url-patterns "*.abc" AND
"*.xyz".
Yes ?
If that works, that's a clever idea, which seems not too difficult to
implement, even for me.
André
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]