Configuration is: the struts-upload example with a windows machine client and a
linux machine server. Upload a file from a remote fileserver and note that the
filename is the entire path.
Looking at the code in MultipartIterator.getNextElement(), it handles the fact
that filenames are not parsed properly in linux jdks, but does not special case
file server paths (eg \\foo\bar\file.mov). It assumes the windows filepath
will have a ":" - needs to also check for "
" - something like:
//check for windows filenames,
//from linux jdk's the entire filepath
//isn't parsed correctly from File.getName()
int colonIndex = filename.indexOf(":");
int slashSlashIndex = filename.indexOf("\\\\");
int slashIndex = filename.lastIndexOf("
");
if ((colonIndex > -1 || slashSlashIndex > -1) && (slashIndex > -1))
{ //then consider this filename to be a full //windows filepath, and parse it accordingly //to retrieve just the file name filename = filename.substring(slashIndex+1, filename.length()); }