I am developing a Java Web app. I have just added a filter in order to make sure that users have logged in.
I added in my web.xml file:
<filter>
<filter-name>security-filter</filter-name>
<filter-class>com.controllers.SecurityFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>security-filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
When I load the pages none of the resources load ie, images, css etc.
The error says: Failed to load resource: net::ERR_TOO_MANY_REDIRECTS 3http://localhost:8080/resources/js/login Failed to load resource: net::ERR_TOO_MANY_REDIRECTS
But if i remove the filter from the web.xml everything is fine.
In my .jsp file I also have the following:
<link href="/resources/css/style.css" rel="stylesheet">
<script src="/resources/js/jquery.min.js"></script>
<script src="/resources/js/bootstrap.min.js"></script>
<script src="/resources/js/bootstrap-select.js"></script>