0

I have a web application with LDAP authentication developed using GWT and restygwt on the client side running on a Glassfish server. Everything seems to be working correctly in Chrome and Firefox. However in Safari. I receive a HTTP Status 0 before even trying to log in. Both Chrome and Firefox are correctly requesting

http://localhost/pROJECT/user/self. 

However Safari is requesting

http://project/user/self

which doesn't exist. All the other css, html, js requests are correct url. Why is Safari removing localhost from the request? and thinks that project is the host? I've been able to do everything so far without looking at the generated javascript. Is that something I have to do at this point?

Here's the service definition

@Path("user")
public interface UserService extends RestService {
    @GET
    @Path("self")
    public void self(MethodCallback<User> callback);
}

Here's the call to the service from the client for verbosity

    userService.self(new MethodCallback<User>() {
        public void onFailure(Method method, Throwable exception) {
            statusBar.error(exception);
        }

        public void onSuccess(Method method, User self) {
            statusBar.done();
        }
    });

I can provide more info or code if requested.

sk8er3810
  • 41
  • 4
  • Are you running it in DEV mode? if yes then `gwt.codesvr parameter` is missing. If you use the URL without gwt.codesvr in it, you are running the compiled version of your app instead of DEV mode. – Braj Apr 30 '14 at 17:46
  • Unfortunately not in DEV mode. I'm using Netbeans for development and was unsure how to setup debugging with GWT in an external instance of glassfish. I've run the GWT examples in eclipse under DEV mode but only because the GWT eclipse plugin made that process easy. – sk8er3810 Apr 30 '14 at 20:16

1 Answers1

0

Try to use Defaults.setServiceRoot(GWT.getHostPageBaseURL()); if not already the case

Ronan Quillevere
  • 3,699
  • 1
  • 29
  • 44