Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

filter  RSS feed

 
Raj Ohadi
Ranch Hand
Posts: 316
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. I know we can specify several filters in web.xml file. But how can I specify the order of filters ? in the chain.doFilter() method how does it know which filter it is going to invoke ?

2. Secondly, suppose I have only one filter and in its "doFilter()" method I put nothing but "chain.doFilter()", then does it mean this filter just does nothing because I don't have any other filter and this one isn't doing anything ?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66203
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) Answered in section SRV.6.2.1 of the Servlet Spec.

2) If you don't do anything, nothing gets done. I'm not sure what else could be expected?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!