Hi All,
I want to authenticating from my gwt app. with a simple j_spring_security by html post request.
It works well in hosted mode and in mvn jetty:run-war.
But when I deploy my application to the jetty, it doesn't works, I've got a 404 html error.
I use Gwt 2.4.0 and Spring 3.1
My relevant config is:
in my gwt sending code is:Code:<security:http auto-config="false" use-expressions="true" access-denied-page="/Argus.html#!authPage" entry-point-ref="authenticationEntryPoint" > <security:intercept-url pattern="/*/!authPage" access="permitAll"/> <security:logout invalidate-session="true" logout-success-url="/Argus.html#!authPage" logout-url="/logout"/> <security:custom-filter ref="authenticationFilter" position="FORM_LOGIN_FILTER"/> </security:http> <bean id="authenticationFilter" class="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter" p:authenticationManager-ref="customAuthenticationManager" p:authenticationFailureHandler-ref="customAuthenticationFailureHandler" p:authenticationSuccessHandler-ref="customAuthenticationSuccessHandler" p:filterProcessesUrl="/j_spring_security_check" /> <bean id="customAuthenticationManager" class="com.argus.gwtp.server.spring.security.ArgusAuthenticationManager" /> <bean id="customAuthenticationFailureHandler" class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler" p:defaultFailureUrl="/Argus.html#!authPage?error=true" /> <bean id="customAuthenticationSuccessHandler" class="org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler" p:defaultTargetUrl="/Argus.html#!authPage?login=success" /> <bean id="authenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint" p:loginFormUrl="/j_spring_security_check"/> <security:authentication-manager/>
What is the difference between mvn jetty:run-war and system started jetty?Code:String url = GWT.getModuleBaseURL() + "/j_spring_security_check"; StringBuffer postData = new StringBuffer(URL.encode(userName)); postData.append('=').append("j_username").append('&'); postData.append("j_password").append('=').append(password); RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, url); builder.setHeader("Content-type", "application/x-www-form-urlencoded");
thx
Zamek


Reply With Quote