Thanks fanfy for the explanation as it gave me a better approach to this.
And your being verbose is good as it gave a detailed explanation
DeepEdward
Thanks fanfy for the explanation as it gave me a better approach to this.
And your being verbose is good as it gave a detailed explanation
DeepEdward
Have a look at the previous posts.. thats gonna help you out..Originally Posted by testing123
I am having the same issue...and like deep says the file still get uploaded.
Thanks fanfy!
I had this same problem. Your explanation was good - and the solution worked for me too.
public void fileUpload(Object command) {
log.info("FILE UPLOAD");
String dir = "z://FileUpload//File_Repository//";
try {
byte buf[] = new byte[1024 * 4];
Portfolio bean = (Portfolio) command;
new File(dir).mkdirs();
log.info("Creating Directory");
File file = new File(dir, bean.getFile().getOriginalFilename());
FileOutputStream output = new FileOutputStream(file);
output.write(bean.getFile().getBytes());
try {
InputStream input = bean.getFile().getInputStream();
try {
while (true) {
int count = input.read(buf);
if (count == -1) {
break;
}
output.write(buf, 0, count);
}
} finally {
input.close();
}
} finally {
output.close();
bean.setFile(null);
}
} catch (Exception e) {
e.printStackTrace();
}
}
Thanks!!! The suggested appraoch helped me to resolve the file (PDF) upload issue using webflow.
The issue was solved when we set bind="false" on transition state.
Check this link first for simple upload file
http://www.ioncannon.net/programming...pload-example/
Then Multi Part
http://www.caucho.com/resin-3.0/jsp/.../multipart.xtp