why dont u write a quick jscript instead to check the value of the file type. u might also want to u use regex to check if the file selected was of a valid extension or not.
personally, i dont find the validation.xml a pain unless the form is huge. for small issues writing a quick jscript seems to be better idea (IMHO).
ps: maybe my ignorance (read lazyness) for reading more about it is the factor.
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]
--
Rajat Pandit | [EMAIL PROTECTED] +91 612 3117606 [ Developer and Part Time Human Being]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

