Hello,

I am using FileUpload widget within a FormPanel. Basically, I am sending an
XML file to FileUpload to test.jsp, where that JSP file is sending that text
file back wrapped in a <Result> tag.

The problem is that event.getResults() from the SubmitCompleteHandler trims
off the result from the beginning. The XML File I am sending is 110lines,
where the result should be:

> <Result>

  <Title>Import XML</Title>

  <Status>true</Status>

  <Data>

   ....

  </Data>

</Result>


But I am only getting the following back:

>   true</Status>

  <Data>

   ....

 </Data>

</Result>


Any ideas why? The code snippet is as follows:

*GWT:*

> FormPanel form = new FormPanel();

form.setAction("../test.jsp");

form.setEncoding("multipart/form-data");

form.setMethod("post");

form.addSubmitCompleteHandler(new SubmitCompleteHandler(SubmitCompleteEvent
> event) {

   Log.debug(event.getResults());

   // Window.alert(event.getResults());

});


*JSP:*

> <%

   ... Read the buffer and place it into a String



  //  Prints on the console the correct full "XML" that I sent through
> FileUpload.

  System.out.println(content);

  out.println("<Result>" + content + "</Result>");

  out.close();

%>



 - Mohamed Mansour

--

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