• Post Reply Bookmark Topic Watch Topic
  • New Topic

two servlet filters how to bypass second one  RSS feed

 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have two filters defined in web.xml file. My problem is I want to avoid second filter getting called if first one gets executed (meaning url-pattern matches). Or is there any way to specify which URL pattern to avoid while specifying filter in web.xml?
 
Mark Spritzler
ranger
Sheriff
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, already deleted the duplicate.

Hi Vicky, we noticed that this thread got posted twice. Be careful about duplicate posting. I know it was just a matter of clicking the add post twice, either through hitting the browser's back button and clicking it again or not.

But you have the ability to delete a thread that you start.

Thanks and welcome to JavaRanch.

Mark
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anyone has an idea about this?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66207
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Flag the request with a boolean scoped variable that instructs the second filter to skip any processing.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!