I found an interesting thing here, My GWT application B inherits another GWT application A as a module. I have put inherit statement in B.gwt.xml and added A as a project in eclipse in B's classpath. A is developed using GWT 1.5 and B is using GWT 1.6
Now even if I don't define anything in B's web.xml, no servlet mapping nothing, and start B in hosted mode, it tries to call UserService located in be. I could see the request is being made in server log, but I don't know why it is happing. The only reason I could think of is A's entry point class does same thing and calls UserService as its first task. Am I doing something wrong while creating modules? How can I avoid that call to UserService and do my login call first ? Thanks for the help. On May 8, 11:59 am, sim123 <[email protected]> wrote: > I have couple of RPC classes in my application and some plain old > servlets to perform specific actions. I am wondering how is order of > execution for RPC vs other HTTP requests works. For example I have a > login servlet which creates session for users and I want to make all > RPC calls after successful login > > public void onModuleLoad() { > > final RequestBuilder builder = new RequestBuilder > (RequestBuilder.POST, "http://localhost:8080/A/login?debug=true"); > > builder.setCallback(new RequestCallback() { > public void onResponseReceived(Request request, Response > response) { > > userService.getUserInfo(new AsyncCallback<User>(){ > > public void onFailure(Throwable caught) { > // TODO Auto-generated method > stub > } > > public void onSuccess(User result) { > System.out.println("User info > received" + result.getUserName()); > } > > });} > > public void onError(Request request, Throwable exception) { > // TODO Auto-generated method stub > > } > }); > > try { > builder.send(); > } > catch (RequestException e) { > // TODO Auto-generated catch block > e.printStackTrace(); > } > > } > > but for some reason the RPC request is getting executed first, and I > get exception there because session is not created. > I know login is not the perfect example here and I will do login via > simple HTML and than load the application. But this should work and my > service call should happen after login response is received, any idea? > > Thanks for the all the help and support. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
