Why is my (Spring Security) servlet filter getting called twice? -


Any ideas about why doFilterHttp being called twice on every request in my SpringSecurityFilter subclass? I do not really know where to start, it looks a little stumped.

I am writing in the code of co-worker who discharges reverse engineering. Best of all I can understand, here is the relevant configuration:

In web.xml:

   

Spring-protection. In XML:

  & lt ;! - Create filter chains for developers, users, and services - & gt; & Lt; Bean id = "User safety filter" class = "org.springframework.security.util.FilterChainProxy" & gt; & Lt; Security: Filter-Series-Map path-type = "ant" & gt; & Lt; Security: filter-chain pattern = "/ ** / JSON / *" filter = "athlete, benaprocessing filter, exception dispatch filter, filter invocation interceptor" / & gt; & Lt; Security: filter-chain pattern = "/ ** / *." Filter "= Filter; Affilter, Benaprocessing Filter, Exception Message Filter, Filter Invocation Interceptor" / & gt; & Lt; Security: filter-chain pattern = "/ **" filter = "anonymous publication, logout filter, exception dispatch filter, filter invocation interceptor" /> & Lt; / Security: Filter Series-Map & gt; & Lt; / Bean & gt;  

It seems that / ** / JSN / * URL filter series is being applied twice, while others receive it only once. I am going to go back and checking to make sure that what I said is really true.

OK, I think this is a fix.

& lt; Filter-Mapping & gt; & Lt; Filter-name & gt; UserSecurityFilter & lt; / Filter-name & gt; & Lt; URL pattern & gt; * do. & Lt; / Url pattern & gt; & Lt; / Filter-mapping & gt; & Lt; Filter-mapping & gt; & Lt; Filter-name & gt; UserSecurityFilter & lt; / Filter-name & gt; & Lt; URL pattern & gt; / Json / * & lt; / URL pattern & gt;

Under URL / JSN / ".do" ends, these URLs were used twice for all Spring Safety goods. Thanks for the responses! Even if it was a dumb problem and I responded to myself, work through reponses prompted me to reply. much appreciated.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -