I looked through all of the archives and couldn't find an answer.. hopefully I am not
doing something stupid.
Everytime I run the code below LOCALLY, it works fine. The minute I try running this
on our server, I get the error message from below
"Invalid File Has Been Entered".
Any clue what I am doing wrong?
My final goal is to get "FileStore" variable to contain the File Object for
processing. Thanks in advance.
MultipartParser mp = new MultipartParser(hinRequest, 10*1024*1024); // 10MB
Part p;
while((p = mp.readNextPart())!=null){
if(p.isFile()){
FilePart fp = (FilePart)p;
String fName = fp.getFilePath();
if(fName == null || fName.toString().equals("")){
System.err.println("An Upload File Must Be Specified");
return;
}
File fileStore = new File(fName);
if(!fileStore.exists()){
System.err.println("An invalid file has been entered.");
return;
}
fp.writeTo(fileStore);
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html