I need to save a file uploaded in WebDynpro Java to a location on one of my companys many internal Window servers but I cannot get it to work. I do not get any errors with the following code, but NOTHING happens... And when I check the folder it is still emply... Please advise. I am particularly not sure about specifying the Path syntax. Also, I do have permission to write to this server. Is it even possible to save to a Windows server from WebDynpro??
//uploaded document already in context...
byte file = element.getFileResource();
// get the size of the uploaded file
// get the extension of the uploaded file
String fName = wdContext.currentContextElement().getFName();
String fExt = wdContext.currentContextElement().getFileExtension();
String foName1 = "
HRP_Attachments\" + fName + ".pdf";
File f1 = new File(foName1);
dos1 = new DataOutputStream(new FileOutputStream(f1));
Edited by: christiaanp on Sep 30, 2011 8:07 AM