Any ideas about why doFilterHttp in my SpringSecurityFilter subclass is getting called twice on each request? I don't really know where to start looking. Feeling a little stumped.
I'm reverse engineering a vacationing co-worker's code. To the best I can figure it, here's the relevant configuration:
in web.xml:
<filter>
<filter-name>userSecurityFilter</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>userSecurityFilter</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>userSecurityFilter</filter-name>
<url-pattern>/json/*</url-pattern>
In spring-security.xml:
<!-- Create the filter chains for developers, users and services -->
<bean id="userSecurityFilter" class="org.springframework.security.util.FilterChainProxy">
<security:filter-chain-map path-type="ant">
<security:filter-chain pattern="/**/json/*" filters="AuthFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor"/>
<security:filter-chain pattern="/**/*.do" filters="AuthFilter,anonymousProcessingFilter,exceptionTranslationFilter,filterInvocationInterceptor"/>
<security:filter-chain pattern="/**" filters="anonymousProcessingFilter,logoutFilter,exceptionTranslationFilter,filterInvocationInterceptor"/>
</security:filter-chain-map>
</bean>
It looks like the /*/json/ urls are getting the filter chain applied twice, while others only get it once. I'm going to go back and check to make sure what I just said is really true.