// System.out.println("param: name=" + name + "; value=" +
// value);
params.put(name, value);
} else if (part.isFile()) {
// it's a file part
FilePart filePart = (FilePart) part;
String fileName = filePart.getFileName();
String filePath = filePart.getFilePath();
if (fileName != null) {
boolean keepFileStru = "true"
.equals(params
.get(IWebResConstants.FILE_PARA_KEEP_FILE_STRUCTURE));
String relativePath = params
.get(IWebResConstants.FILE_PARA_TARGET_RELATIVE_PATH);
IPath newFilePath = null;
if (keepFileStru && relativePath != null
&& relativePath.length() > 0) {
newFilePath = new Path(tmpDir.getAbsolutePath())
.append(relativePath);
} else
newFilePath = new Path(tmpDir.getAbsolutePath())
.append(fileName);
File newFile = newFilePath.toFile();
createFile(newFile, false);
long size = filePart.writeTo(new FileOutputStream(
newFile));
/*
* System.out.println("file: name=" + name +
* "; fileName=" + fileName + ", filePath=" +
* filePart.getFilePath() + ", targetPath= " +