I\'m working through the Java EE servlet tutorial and tried the mood example. I noticed the doFilter is getting called twice, once the servlet call is in the chain and the secon
As @BalusC said, in my case the browser was requesting the favicon.ico by default, so there was an error in the browser's console
Failed to load resource: the server responded with a status of 404 (Not Found)
So I followed this answer and the error dissapeared but then I got the filter to get called twice.
MY SOLUTION
I replaced
For this: