Hi All,
I m using GWT component to upload file to server.At server
side i'm using common.jar to process request with plain Servlet. But
whiling putting special Characters or Russain Characters ,File name
at server side got corrupted.
I have set request.setCharacterEncoding("UTF-8") as well.
// Create a FormPanel and point it at a service.
final FormPanel form = new FormPanel();
//The /myFormHandler is a servlet
form.setAction("/myFormHandler");
// Because we're going to add a FileUpload widget, we'll need to set
the
// form to use the POST method, and multipart MIME encoding.
//VERY IMPORTANT when using FileUpload
form.setEncoding(FormPanel.ENCODING_MULTIPART);
form.setMethod(FormPanel.METHOD_POST);
// Create a panel to hold all of the form widgets.
VerticalPanel panel = new VerticalPanel();
form.setWidget(panel);
// Create a TextBox, giving it a name so that it will be submitted.
final TextBox tb = new TextBox();
tb.setName("textBoxFormElement");
panel.add(tb);
// Create a ListBox, giving it a name and some values to be associated
with
// its options.
ListBox lb = new ListBox();
lb.setName("listBoxFormElement");
lb.addItem("foo", "fooValue");
lb.addItem("bar", "barValue");
lb.addItem("baz", "bazValue");
panel.add(lb);
// Create a FileUpload widget.
FileUpload upload = new FileUpload();
upload.setName("uploadFormElement");
panel.add(upload);
// Add a 'submit' button.
panel.add(new Button("Submit", new ClickHandler() {
public void onClick(ClickEvent event) {
form.submit();
}
}));
Thanks in Advance:
--Nimish
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---