[Javalist] Jetty+spring+gwt furcsa viselkedés

Gábor Garami gabor.garami at hron.me
2013. Feb. 23., Szo, 15:11:26 CET


Nezd meg. Ott van a maven plugin jar-jaban asszem a futtatott jetty konfigja.

Garami Gábor
E-mail: gabor.garami at hron.me
Tel: +36 20 235 9621
MSN: hrgy at vipmail.hu
Skype: hron84


2013/2/23 zamek42 <zamek42 at gmail.com>:
> hello,
>
> Egy Spring+gwt app.-ot futtatnék jetty alól, de igen furcsán viselkedik az
> autentikáció.
>
> Ha mvn gwt:debug vagy mvn jetty:run-war-ral futtatom, akkor minden jól
> működik. Ha utána egy service-ben futó jetty alá deploy-olom, akkor 404-es
> hibát kapok. Tettem debug üzeneteket a spring modulba, ilyenkor az el sem
> indul.
>
> Vannak további rpc hívások, azok jól működnek mindkét módon, csak az
> autentikáció "téved el".
>
> A környezet: Spring 3.1, GWT 2.4 Jetty8
>
> Az idevágó spring config:
>
> <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/>
>
>
> a GWT kódrészlet:
>
> 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");
>
>
>
> Mi lehet a különbség az mvn alól futtatott jetty és a service-ben futtatott
> között?
>
> --
> thx
> Zoltan (Zamek) Zidarics
> programmer
> email:zamek42 at gmail.com
> skype:zamek_z
>
> _______________________________________________
> Javalist mailing list
> Javalist at lists.javaforum.hu
> http://lists.javaforum.hu/mailman/listinfo/javalist


További információk a(z) Javalist levelezőlistáról