I have a servlet that should allow my users to upload files to be stored in the database using a standard multipart form. I'm pretty sure that I haven't missed anything, but I am still receiving File Not Found error. Can someone take a look and let me know if they see anything that might be the cause of the File Not Found error that I am receiving?
BTW: I suppose I should tell you that this works on my standalone test environment perfectly, but not on the server.
OutputStream fileOut = null;
FileInputStream fileIn = null;
File binaryFile = new File(addFiles[fileCt]); //addFiles comes directly from the multipart form
fileIn = new FileInputStream(binaryFile);
fileOut = blobLocator.getBinaryOutputStream();
byte buffer = new byte[blobLocator.getBufferSize()];
int length = 0;
while((length = fileIn.read(buffer)) != -1)
fileOut.write(buffer, 0, length);
fileOut = null;
fileIn = null;