[bug?] UrlRewrite not working well with cometd / Bayeux continuation

5 views
Skip to first unread message

Hendy Irawan

unread,
Dec 4, 2009, 6:54:02 AM12/4/09
to UrlRewrite
Hi,

It seems that UrlRewrite interferes with filters using continuation or
perhaps with NIO.

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.

I also had other filter, Spring Security, but it doesn't seem to
interfere.

Original thread in cometd-users mailing list is:
http://groups.google.com/group/cometd-users/browse_thread/thread/b2e749f47bbe360b

Thank you.

Avlesh Singh

unread,
Dec 4, 2009, 12:04:55 PM12/4/09
to urlre...@googlegroups.com
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


--

You received this message because you are subscribed to the Google Groups "UrlRewrite" group.
To post to this group, send email to urlre...@googlegroups.com.
To unsubscribe from this group, send email to urlrewrite+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/urlrewrite?hl=en.



Hendy Irawan

unread,
Dec 4, 2009, 2:34:10 PM12/4/09
to UrlRewrite
Thanks Avlesh, I'll try it!
Reply all
Reply to author
Forward
0 new messages