Hi, Tom Thanks for your useful explaination. Based on your suggestion, I have successfully parsed the paramters using the Apache FileUpload.
Thanks again...Qi On Mon, Dec 14, 2009 at 1:01 AM, Thomas Broyer <t.bro...@gmail.com> wrote: > > > On 11 déc, 12:22, Qi Zhang <qzha...@gmail.com> wrote: > > Hi, > > > > Actually after I changed > > the form.setEncoding(FormPanel.ENCODING_MULTIPART); > > to form.setEncoding(FormPanel.ENCODING_URLECONDING), those parameters are > > passed to the servelt successfully, I really do not understand why? > > Because servlet's getParameter() usually don't decode multipart/form- > data (because it might contain files) while they (servlet containers) > usually decode application/x-www-form-urlencoded (because they can > only contain strings). > > You'd have to read multipart/form-data "yourself", many people using > Apache Commons FileUpload. > > > I use traditional forms because I already have existing servlet code to > > handle the form submission. > > You could use RequestBuilder on the client side, building your > application/x-www-form-urlencoded payload yourself.But for file > uploads, you have no other options than forms (or Flash, or Gears, or > BrowserPlus, or the upcoming ability to send files via XMLHttpRequest > that some browsers already ship; but forms are the easiest way of > doing it in a cross-browser way, Flash being the second easiest). > > -- > > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to google-web-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > > -- =============== Leap Ahead =============== -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.