Hi, I have a GWT client that communicates with a Spring/SpringSecurity 3.0 server via REST/JSON. Both run on the same tomcat/jetty perfectly, but I have a problem introducing the authentication: If I "POST" the server with an external HTTP client the url:
http://localhost:8080/myserverapp/j_spring_security_check?j_username=julio&j_password=mypass the server response is OK (200) but when GWT client tries the same, the status code returned is 0. This is the code I'm using at the moment: final StringBuilder content = new StringBuilder(); content.append("j_username=" + URL.encode("julio")); content.append("&j_password=" + URL.encode("mypass")); final RequestBuilder builder = new RequestBuilder(RequestBuilder.POST, URL.encode(BASEURL + "/ j_spring_security_check")); builder.setHeader("Content-Type", "application/x-www-form- urlencoded"); try { builder.sendRequest(content.toString(), new RequestCallback() { public void onResponseReceived(Request request, Response response) { Window.alert("STATUS : " + response.getStatusCode()); // returns 0 ?? } public void onError(Request request, Throwable exception) { Window.alert("ERROR"); } }); } catch (final RequestException e) { Window.alert(e.getLocalizedMessage()); } why does it return 0? any idea? Thanks, Julio -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.