Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

filter behavior when exception is thrown

 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just wanna confirm that when a certain processing throws an exception even when said exception happens inside doFilter, any servlet container will never proceed to the next filter right? thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65542
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems easy enough to try it out. Why not write some test code to give it a whirl?
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, what i meant is, short of rewriting the servlet container code, it's impossible to proceed to the next filter right? I'm wondering if there's some sort of configuration I'm not aware that would enable such behavior? I'm trying to find out why my custom message is not being used in my filter, so I;m thinking, perhaps it has something to do with the exception I throw during the processing. If I can be sure that there's just no way that tomcat provide any hooks or config to keep going to the next filter when exception occurs, then I can eliminate this possibility. So basically, I just want to eliminate this possibility with absolute certainty. thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65542
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any uncaught exception will interrupt the filter chain.
 
David Spades
Ranch Hand
Posts: 348
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and there's no possible configuration that would alter that behavior in standard tomcat right? thanks
 
Yup, yup, yup. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!