Here what you are looking for is to upload a file using GWT/GXT form panel right?. There is no need to get the full path of the file or use the name to do this task. You can achieve this doing following
1.Hope you already added the FormPanel correctly check whether you specified these properties
final FormPanel fp = new FormPanel();
fp.setAction("url which handles file uploads");
fp.setEncoding(Encoding.MULTIPART);
fp.setMethod(Method.POST);
2.Implement a servlet which handles the POST requests and read the file data from the request. you can easily use guava or apache commons file utilities for this purpose.
3.Configure the file upload servlet mappings in web.xml (for production mode) or if you want to use it in dev mode add the same mapping in yourmodule.gwt.xml
as well. ex:
<servlet path="/<path to servlet>" class="<fully-qualified class name of servlet>"/>
4.Handle the file submission complete event by adding a handler to form panel
fp.addSubmitCompleteHandler(new SubmitCompleteHandler() {
public void onSubmitComplete(SubmitCompleteEvent event) {
//event handling
}
});
By the way, I found a nice library which does multi file uploads. https://code.google.com/p/gxt-multi-upload/
Hope this will help.