Check the javadocs for org.apache.struts.upload.FormFile,
I think has a member, fileName, or something like that.
You want to have a string filename on your form, and then
make IT required. When the user successfully supplies a
value, then you can set the FormFile's value to it.

or something like that...

-jeff

On Friday, November 7, 2003, at 08:24 AM, Sunny wrote:

Hi friends,

I'm a newbie to struts.

While uploading a file, I want to validate, whether the user has selected
the file or not.


 i mean i want to handle situation when user submits the form with out
selecting any file.

in my validation.xml, i've made field's property as depends = "required"

but i am getting the exception
org.apache.commons.beanutils.ConversionException: Cannot assign value of type
'java.lang.String' to property 'projectFile' of type
'org.apache.struts.upload.FormFile'


kindly help me in this regard.

Sunny.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to