Dynamic form and Upload
Hi, I want to use struts dynamic form feature. There is form which has an upload file filed and some input text. I used below in struts_config.xml form-bean name=TenderVwcredForm dynamic=true type=org.apache.struts.validator.DynaValidatorForm form-property name=tenderTitle type=java.lang.String/ form-property name=productName type=java.lang.String/ form-property name=tenderFile type=org.apache.struts.upload.FormFile/ /form-bean But I got the classcast exception: error BeanUtils.populate org.apache.commons.beanutils.ConversionException: Cannot assign value of type 'java.lang.String' to property 'tenderFile' of type 'org.apache.struts.upload.F ormFile' Please help. __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Dynamic form and Upload
On Sat, 2 Nov 2002, Mr Alireza Fattahi wrote: Date: Sat, 2 Nov 2002 05:21:12 + (GMT) From: Mr Alireza Fattahi [EMAIL PROTECTED] Reply-To: Struts Users Mailing List [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Dynamic form and Upload Hi, I want to use struts dynamic form feature. There is form which has an upload file filed and some input text. Using form beans (either standard ActionForm subclasses or using DynaActionForm/DynaValidatorActionForm) is not sufficient for supporting file upload functionality. You must explisitly use the file upload support provided by Struts directly (in 1.0) or indirectly via the commons-fileupload module( in 1.1). For an example of the required programming techiques, see the struts-upload example app that is included with the Struts distribution. Craig -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org
Re: Dynamic form and Upload
Thanks for your reply, I have seen the example and an work with it, But my problem is I can not do that in an dynamic form. How should I do it in dynamic form, and what should I put in struts.config.xml? As I told I got the class cast expetion. Thanks __ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: mailto:struts-user-unsubscribe;jakarta.apache.org For additional commands, e-mail: mailto:struts-user-help;jakarta.apache.org