Hi,
I'm using Spring 3.1.1.RELEASE with the accompanying Spring security. I'm hoping there's something really obvious I'm missing because I repeatedly get 404s when I try and submit to my Spring security check URL -- "/j_spring_security_check". I want to use a custom authentication filter. Below is my Spring security config …
Here is the Spring security filter in my web.xml file …Code:<global-method-security pre-post-annotations="enabled"> </global-method-security> <beans:bean id="pdUsernamePasswordUrlAuthenticationFilter" class="org.mainco.subco.myproject.security.subcoUsernamePasswordUrlAuthenticationFilter"> <beans:property name="filterProcessesUrl" value="/j_spring_security_check"/> <beans:property name="authenticationManager" ref="authenticationManager"/> <beans:property name="authenticationFailureHandler"> <beans:bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"> <beans:property name="defaultFailureUrl" value="/pdregistration/loginfailure"/> </beans:bean> </beans:property> <beans:property name="authenticationSuccessHandler"> <beans:bean class="org.mainco.subco.myproject.security.web.authentication.PDRegistrationAuthenticationSuccessHandler"> <beans:property name="defaultTargetUrl" value="/pdregistration/authenticate" /> </beans:bean> </beans:property> </beans:bean> <beans:bean id="loginUrlAuthenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"> <beans:property name="loginFormUrl" value="/login" /> </beans:bean> <beans:bean id="subcoSecurityContextRepository" class="org.mainco.subco.myproject.security.subcoSecurityContextRepository" /> <!-- Reg controller for PD --> <http pattern="/pdregistration/*" name="pdSecurity" auto-config="false" use-expressions="true" authentication-manager-ref="authenticationManager" access-denied-page="/denied" entry-point-ref="loginUrlAuthenticationEntryPoint"> <custom-filter position="FORM_LOGIN_FILTER" ref="pdUsernamePasswordUrlAuthenticationFilter"/> <intercept-url pattern="/pdregistration/regfailure" access="hasAnyRole('Teacher')"/> <intercept-url pattern="/pdregistration/regsuccess" access="hasAnyRole('Teacher')"/> <intercept-url pattern="/pdregistration/errors/*" access="permitAll" /> <logout invalidate-session="true" logout-success-url="/logout" logout-url="/j_spring_security_logout" /> </http> <authentication-manager alias="authenticationManager" id="authenticationManager"> <authentication-provider user-service-ref="sbdUserDetailsService"> <password-encoder ref="passwordEncoder" /> </authentication-provider> </authentication-manager>
What else am I missing? Note that I define "j_spring_security_check" as the "filterProcessesUrl" of my "pdUsernamePasswordUrlAuthenticationFilter" filter.Code:<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>
The log entry I get is
Thanks for any advice, - DaveCode:09:33:29,134 WARN [org.springframework.web.servlet.PageNotFound] (http--127.0.0.1-8080-4) No mapping found for HTTP request with URI [/myproject/j_spring_security_check] in DispatcherServlet with name 'myprojectDispatcher'


Reply With Quote