Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Question on filter chaining
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Avlesh Singh  
View profile  
 More options Jun 10, 5:37 am
From: Avlesh Singh <avl...@gmail.com>
Date: Wed, 10 Jun 2009 15:07:57 +0530
Local: Wed, Jun 10 2009 5:37 am
Subject: Question on filter chaining

I have a bunch of filters configured in my webapp, the UrlRewrite filter
being the first one in the chain.
I noticed a strange behavior, url's that were rewritten bypassed all the
subsequent filters. On looking into the UrlRewriteFilter source, I spotted
this code

if (!requestRewritten) {

>   chain.doFilter(hsRequest, urlRewriteWrappedResponse);
> }

I am trying to understand what does this mean. Should UrlRewrite be the last
filter in the chain? If yes, why? As in, why should all other filters be
skipped when the url is rewritten?

Cheers
Avlesh


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Wim De Smet  
View profile  
 More options Jun 11, 3:57 am
From: Wim De Smet <krom...@gmail.com>
Date: Thu, 11 Jun 2009 09:57:15 +0200
Local: Thurs, Jun 11 2009 3:57 am
Subject: Re: Question on filter chaining
Hi,

On Wed, Jun 10, 2009 at 11:37 AM, Avlesh Singh<avl...@gmail.com> wrote:
> I have a bunch of filters configured in my webapp, the UrlRewrite filter
> being the first one in the chain.
> I noticed a strange behavior, url's that were rewritten bypassed all the
> subsequent filters. On looking into the UrlRewriteFilter source, I spotted
> this code

>> if (!requestRewritten) {
>>   chain.doFilter(hsRequest, urlRewriteWrappedResponse);
>> }

> I am trying to understand what does this mean. Should UrlRewrite be the last
> filter in the chain? If yes, why? As in, why should all other filters be
> skipped when the url is rewritten?

I'm not sure about the why (I assume re-parsing request parameters
etc) but rewritten urls get FORWARD'ed. This is why you'll have to
make other filters listen on FORWARD if you want them to get hit after
rewriting.

regards,
Wim


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google