hi I have a form which sends a request to a servlet for uploading a
file. How can i handle the exceptions? THe exceptions are caught in
the doPost method of the servlet. The form in my app looks like:
form = new FormPanel();
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
form.setAction("/myfacerecognitionwa/upload");
form.addSubmitHandler(new SubmitHandler(){
@Override
public void onSubmit(SubmitEvent event) {
try{
}catch(Exception e){
Window.alert("Error: " +
e.getMessage());
return;
}
Window.alert("The file was uploaded!");
}
});
vPanel = new VerticalPanel();
upload = new FileUpload();
upload.setName("upload");
vPanel.add(upload);
vPanel.add(new Button("Submit", new ClickHandler()
{
public void onClick(ClickEvent event) {
form.submit();
}
}));
form.add(vPanel);
What can I do? I want to catch the exceptions and show them using
Window.alert("Error: " + ioe.getMessage());
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---