I am creating a small servlet project to mock an authentication flow. I am performing authentication with a servlet filter sitting in front of a few JSP pages.
To map the urlPatterns captured by the filter, I am using a WebFilter annotation specified as follows:
@WebFilter({"","/gallery.jsp","/welcome.jsp"})
From my understanding, the empty string should catch the root path.
So when I enter localhost:8080/auth-jsp-demo/
into my browser the filter should catch. However, my logs are showing that the filter is not catching the root path.
I am using Tomcat v9 and JDK 11.