Nov 03, 2012 8:51:23 PM com.google.appengine.tools.development.LocalResourceFileServlet doGet
WARNING: No file found for: /mate/MySQLConnection
gwt.xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?><module rename-to="mate">
<!-- Inherit the core Web Toolkit stuff. -->
<inherits name="com.google.gwt.user.User"/>
<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<inherits name="com.google.gwt.user.theme.clean.Clean"/>
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/> -->
<!-- Other module inherits -->
<!-- Specify the app entry point class. -->
<entry-point class="main.client.Mate"/>
<servlet class="main.server.MySQLConnection" path="/MySQLConnection"/>
</module>
Mate.java
...
private class AuthenticationHandler<T> implements AsyncCallback<User> {
public void onFailure(Throwable ex) {
Window.alert(ex.getMessage());
RootPanel.get().add(new HTML("RPC call failed"));
// Convenient way to find out which exception was thrown.
try {
throw ex;
} catch (IncompatibleRemoteServiceException e) {
System.out.println(e);
// this client is not compatible with the server; cleanup and refresh the
// browser
} catch (InvocationException e) {
System.out.println(e);
// the call didn't complete cleanly
} catch (Throwable e) {
System.out.println(e);
// last resort -- a very unexpected exception
}
}
public void onSuccess(User result) {
//do stuff on success with GUI, like load the next GUI element
RootPanel.get().add(new HTML("Success!"));
}
}
...
Button named "OK" which calls AuthenticationHandler
OK.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
AsyncCallback<User> callback = new AuthenticationHandler<User>();
rpc.greetServer(usernameBox.getText(), passwordBox.getText(), callback);
}
});
Not sure what else to supply. Please let me know what you would like to see and I will gladly paste it in here.
Thanks!
-- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/7IPL31fIFiwJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment