email and destroy the original
message without making a copy. Thank you.
- Original Message - From: "Lance" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Monday, April 30, 2007 9:21 AM
Subject: Re: ClassCast Exception for ExcelFile Upload
I think thi
you.
- Original Message -
From: "Lance" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List"
Sent: Monday, April 30, 2007 9:21 AM
Subject: Re: ClassCast Exception for ExcelFile Upload
I think this is your problem... FileInputStream fin = (FileInputStream)
I think this is your problem...
FileInputStream fin = (FileInputStream) in;
Do you need to do this?
Can you do RcsaPOIEventListner.readExcelStream(in);
The input stream is coming from the request which is not necessarily saved to
disk / read from a FileInputStream.
Kirthi wrote:
I am havin
Oops, no, that wouldn't work in this case. Perhaps it would be better if
we back up for a moment: why do you need a FileInputStream specifically?
Since FIS is a 'root level' IS implementation, i.e. designed to wrap a
datasource (file) directly rather than than to augment an existing stram
(lik
>> }
>>
>>
>> **
>>
>> import org.apache.struts.validator.ValidatorForm;
>> import org.apache.struts.upload.FormFile;
>>
>> /**
>> [EMAIL PROTECTED]
>> *
>> */
>>
>> /**
>> *Form bean for File
You didn't specify which line in the code you posted is throwing the
exception, but I would guess it's this:
InputStream in = (InputStream) formFile.getInputStream();
FileInputStream fin = (FileInputStream) in;
It's never wise to down-cast a value from an interface type
celFile() {
return excelFile;
}
/**
* @param theFile The FormFile to set.
*/
public void setExcelFile(FormFile excelFile) {
this.excelFile = excelFile;
}
}
--
View this message in context:
http:
7 matches
Mail list logo