Go this error while adding filter to web.xml.
My mistake was that i forgot creating the <filter> tag inside the <filters>.
I did this:
<filters>src/main/filters/filter.properties</filters> instead of doing this:
Minor mistake that can happen in one minute out of focus.
Hoped it helped,