I afraid this is not going to work.
I have Application written with GWT 1.7 (just updated). I have one
page where I upload file to the remote server that is on different
domain. So, when I do Post to the server file gets uploaded to the
server but when it's time to get response I'm getting NULL. Here is
what I have:

Servlet:
=========== START =============
...
resp.setStatus(HttpServletResponse.SC_CREATED);
resp.getWriter().print("The file was created successfully.");
resp.flushBuffer();
...
=========== END ===============

GWT:
============== START ============
form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() {
                public void onSubmitComplete(SubmitCompleteEvent
event) {
                        Window.alert(event.getResults());
                }
================ END =============

Javadoc for event.getResults() said following: Returns: the result
html, or null if there was an error reading it @tip The result html
can be null as a result of submitting a form to a different domain.

I assume they mean here that there is a problem with Cross Domain
security.

This is the code example [ 
http://code.google.com/p/faculty-gwt/source/browse/#svn/trunk/examples/gwtfileupload
] that I tried to follow. It works as is, but when I'm calling my
servlet the response is null.

By the way I tried to use Firebug to see Headers and it seems to me
that servlet is sending response back.




On Jul 15, 1:04 am, Hetman <[email protected]> wrote:
> I think that simply solution is to make your servlet parse normal POST
> request and use FileUpload inside FormPanel.
>
> Also then in future you can use swfupload to show progress of upload
> (but then remember to load swf file from server where you want send
> data)
>
> but this only is so simple if you dont need autorization for upload.
>
> On Jul 15, 7:24 am, Maksim Ustinov <[email protected]> wrote:
>
> > Is there any workaround for http response.
> > I have Servlet hosted on another server for large file upload (GAE
> > does not support files larger than 10 mb) and I really need to get
> > response back from the server with the name of the file and if it was
> > successful uploaded or not.
> > What can I do to get that response? What technologies can be used for
> > that? One thing that I can think of is to Saving that response to the
> > database, but it is kind of worthless and resource consuming. Any
> > ideas?
>
> > Thanks.
>
>
--~--~---------~--~----~------------~-------~--~----~
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