on 09-14-2014 6:57 AM
Hi,
I am using File Upload functionality to upload a file to the server temporarily and then reading it again back ..
I am using the below code to upload the file to the server..,
int temp = 0;
File f = new File(wdContext.currentcontextElement().getFileResource().getResourceName().toString());
FileOutputStream fos = new FileOutputStream(f);
if(wdContext.currentcontextElement().getFileResource() != null)
{
InputStream stream = wdContext.currentcontextElement().getFileResource().read(false);
while((temp = stream.read()) != -1)
{
fos.write(temp);
}
}
fos.flush();
fos.close();
path = f.getAbsolutePath();
When I try to read the file from the above path I am getting the File not found exception ....
The above code works fine in Dev but having issues in Q . Any particular reasons ???? Any help would be highly appreciated ....
Thanks.....
Hi,
The exception is totally direct - the file is not in the required path.
See if the file is available on the path mentioned by Vijay.
regards,
Ashvin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check permissions on your INT server, whether it allows upload or not
--
Rregards,
Amey
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Path is:- C:\usr\sap\SID\JC Instance\j2ee\cluster\server0
Check wether the file is avaliable or not in Server0 Path.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.