There are pages on my site that process the uploading and storing of files (images) from the client's computer, and while IE leaves the full path of the file (like C:\myphotos\jpeg\example.jpg), Mozilla only passes the name of the file (like example.jpg), which is no good! I need to have the full path of the image file in order for it to work.
How do I fix this issue?
Here is a snippet of my servlet code, within the code I commented where the problem occurs...halting my servlet from continuing to process...but only in Mozilla.
//.....
List items = upload.parseRequest(request); // Create a list of all uploaded files.
Iterator it = items.iterator(); // Create an iterator to iterate through the list.
while(it.hasNext()) {
FileItem item = (FileItem)it.next();
File f = new File(item.getName()); // Create a FileItem object to access the file.
//THE STATEMENT BELOW HALTS THE REST OF THE SERVLET FROM PROCESSING
//BECAUSE THE FILE PATH IS INCOMPLETE
FileInputStream fs = new FileInputStream(f);
//...
Any input is appreciated,
Love2Java