Hi,
I doubt about the form's action URL Can you check the action value by Window.alert(GWT.getModuleBaseURL() + "ImageUpload.do"); on click of button. Let me know how it goes. thanks, Bakul On Oct 9, 9:20 am, YB <[EMAIL PROTECTED]> wrote: > It's an existing servlet. I can access it > withhttp://localhost/app-name/ImageUpload.do > on my browser. > So for url i have tried providing it > explicitlyhttp://localhost/app-name/ImageUpload.do, > relative /app-name/ImageUpload.do > I have also tried without the FileUpload object, with a text field, a > simple post to some other existing servlets in my app - no activity. > Also, that Window.alert never pops up. > > On Oct 9, 2:53 am, mon3y <[EMAIL PROTECTED]> wrote: > > > Are you sure you need that "ImageUpload.do"); > > should it not be "ImageUpload"); ?? > > > On Oct 9, 8:21 am, mon3y <[EMAIL PROTECTED]> wrote: > > > > Does that Window.alert pop up? > > > > If not: > > > 1)Did you map the servlet in your xml? > > > 2) There's an error on your server side > > > 3)It doesn't find your server class that handles the upload > > > > If it does: > > > *shrug* > > > > On Oct 9, 6:48 am, YB <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > My file upload not submitting. Form handler is printing out the debugs > > > > when i click submit, but the server is not registering any activity. > > > > No errors in the log on client or server. > > > > > the code: > > > > final FormPanel form = new FormPanel(); > > > > form.setAction(GWT.getModuleBaseURL() + > > > > "ImageUpload.do"); > > > > form.setEncoding(FormPanel.ENCODING_MULTIPART); > > > > > form.setMethod(FormPanel.METHOD_POST); > > > > VerticalPanel panel = new VerticalPanel(); > > > > form.setWidget(panel); > > > > > FileUpload upload = new FileUpload(); > > > > upload.setName("uploadFormElement"); > > > > panel.add(upload); > > > > panel.add(new Button("Submit it !!!!", new ClickListener() { > > > > public void onClick(Widget sender) { > > > > System.out.println("onClick() called"); > > > > form.submit(); > > > > } > > > > })); > > > > > form.addFormHandler(new FormHandler() { > > > > public void onSubmit(FormSubmitEvent event) { > > > > System.out.println("form handler onSubmit() > > > > invoked"); > > > > System.out.println("event: " + event); > > > > System.out.println("event.isCanceled: " + > > > > event.isCancelled()); > > > > } > > > > public void onSubmitComplete(FormSubmitCompleteEvent > > > > event) { > > > > Window.alert(event.getResults()); > > > > } > > > > }); --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
