Hello,
I'm trying to make form login work with Tapestry 5 and SS 2.0.4
When the login form submission is made, the POST request ends up in Login.onSubmit() (where Login is the Java class corresponding to the form and onSubmit() is the submission handler). Well, the request should be forward to j_spring_security_check since I want to let SS handle security. The forward fails however withIf I hit /myapp/j_spring_security_check directly from a browser, the URL exists (if I do a GET there is the expected exception about null credentials, that's ok, it proves the execution path is the right one).Code:The requested resource (/myapp/j_spring_security_check) is not available.
From Login.java I perform a simple forward:
(BTW, I've also tried without the / in the front, no change.Code:request.getRequestDispatcher("/j_spring_security_check").forward (request, response);
If I step through the code, it only happens inside Tomcat's classes, never hitting Spring. Which means a forward doesn't go through Spring. Is there a way to do this?
web.xml contains the following:
my applicationContext-security.xml (included in the main applicationContext.xml) has the followingCode:<filter> <filter-name>springSecurityFilterChain</filter-name> <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class> </filter> <filter> <filter-name>TapestryFilter</filter-name> <filter-class>org.apache.tapestry5.spring.TapestrySpringFilter</filter-class> </filter> <filter-mapping> <filter-name>TapestryFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <filter-mapping> <filter-name>springSecurityFilterChain</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
Any advice is highly appreciated.Code:<?xml version="1.0" encoding="UTF-8"?> <b:beans xmlns="http://www.springframework.org/schema/security" xmlns:b="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.1.xsd"> <http> <intercept-url pattern="/" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <intercept-url pattern="/Start" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <intercept-url pattern="/Login" access="IS_AUTHENTICATED_ANONYMOUSLY"/> <intercept-url pattern="/protected/**" access="ROLE_USER"/> <form-login login-page="/Login" default-target-url="/Start" authentication-failure-url="/Login?login_error=1" login-processing-url="/j_spring_security_check"/> <anonymous /> <logout logout-success-url="/Start"/> </http> <authentication-provider user-service-ref="myUserDetailsService"> </authentication-provider> </b:beans>
Thanks,
JL


