I’m having hard time to get RESTeasy working with my existing application. I can hit my end points (AdminService). My problem is everytime I make a GET request (over browser) I hit twice on my service so it leads to duplicate results. I tried with POST using a java client still the problem is there. Following you can find my technology list.
Spring security 3.x
Spring 2.5
RestEasy 2.3.5.Final
==Part of my web.xml==
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>au.com.esriau.dekho.application.ApplicationLoader</listener-class>
</listener>
<listener>
<listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap
</listener-class>
</listener>
<servlet>
<servlet-name>Resteasy</servlet-name>
<servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Resteasy</servlet-name>
<url-pattern>/rest/*</url-pattern>
</servlet-mapping>
<context-param>
<param-name>resteasy.servlet.mapping.prefix</param-name>
<param-value>rest</param-value>
</context-param>
<context-param>
<param-name>resteasy.resources</param-name>
<param-value>com.admin.AdminService
</param-value>
</context-param>
I’d appreciate your solution or idea to trouble shoot this.
cheers
Don’t bother reading this. This was due to my custom implementation of AbstractAuthenticationProcessingFilter in spring-security. I was basically making unnecessary call to the super class with super.doFilter(request, response, chain). This was done right after I execute my custom filters. Getting rid of super.doFilter resolved the issue for me.