It seems that UrlRewrite interferes with filters using continuation or perhaps with NIO.
Nope. The URF "forwards" a request once a URL for a matching rule is "re-written". This essentially means that the request is dispatched to a new location. Web application filters, typically, are configured to be listening only on request's and NOT forwards.
I'm trying to use cometd servlet, that requires ContinuationFilter under Tomcat 6.0.20. With urlrewrite filter enabled, it sometimes give errors. Disabling urlrewrite filter (or using it for different url-pattern) solves the problem.
In light of what I said above, if you add the underneath to your ContinuationFilter's filter-mapping in web.xml, it would be called even when the request is forwarded via a dispatcher.
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
Let me know, if this resolves the issue.
Cheers
Avlesh