On 24 juil, 05:46, kongxiaoyang <[email protected]> wrote:
> Hello guys,
>
> My fileupload function works pretty fine in the GWT default testing
> environment jetty, but when I compile the project to js files, and
> deploy it to TOMCAT, it does not work.
> When I click the Submit button, only the Window.alert() runs, but no
> file been uploaded.
[...]
>                 final FormPanel fileForm = new FormPanel();
>                 fileForm.setAction("/csspweb/fileUpload");

In HostedMode, your app is loaded as the "ROOT" webapp; with the above
code, this has to be the same when you deploy to your server
(ROOT.war). If it isn't the case, use GWT.getHostPageBaseURL() as
prefix:

    fileForm.setAction(GWT.getHostPageBaseURL() + "csspweb/
fileUpload");

Don't you have a 404 error in your server logs? Have you tried putting
a Window.alert(arg0.getResults()) in your onSubmitComplete?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to