Hi Bakul,
i changed to: form.setAction("imageUpload.do");
here's the output from the window.alert() as you asked:
panel.add(new Button("Submit it !!!!", new ClickListener() {
public void onClick(Widget sender) {
System.out.println("onClick() called");
Window.alert(form.getAction());
form.submit();
}
}));
Getting this: imageUpload.do and of course it's not working still ;(
Question for you. If you change your action to an undefined servlet
name, will you get any reaction from the submit? anything on the
server or client log? What is the behaviour that i am supposed to
expect from the submission... a new page redraw? My imageUpload.do
servlet currently redirects to an index.jsp when its done accepting
the multipart. Should it return some special a-OK message instead? Not
that my GWT app is even getting to the servlet yet.
Thanks for the help!!!
On Oct 9, 10:17 am, Bakulkumar <[EMAIL PROTECTED]> wrote:
> Or simply try it by
>
> form.setAction("ImageUpload.do");
>
> it works for me.
>
> Thanks,
> Bakul.
>
> On Oct 9, 10:15 am, Bakulkumar <[EMAIL PROTECTED]> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---