| Author |
Portlets with Struts File Upload Trouble
|
tersanch Fernandes
Greenhorn
Joined: Jan 28, 2006
Posts: 3
|
|
Hey Everyone, I have a jsp file with a few text fields I generate the text field on the jsp page useing the <html:text> Tag I also have a <html:file>TAG as i need to give users to upload a file on the same jsp page. I use a FormBean which is as below which has the appropriate getter and seter methods and have kept it in session. public class StockRepairForm extends ValidatorForm implements Serializable { private String model_Num1 =""; private String model_Num2 =""; private FormFile csvFile; } I have set the form to enctype = "multipart/form-data" so that its able to accomodate the <html:file> and the FormBEan is populated. For some reason I get null values from the FormBean from the action class for the text fields that I have in the jsp. But when i make changes the enctype="multipart/mixed" I do get the formbean values for the text field in the action class. But the <html:file> TAG for some reason is throwing the exception mentined below. THe exception mentined below disappears when i change the enctype = "multipart/form-data" but when I make this change the text fields are not getting populated and I get empty values in the action class. Nested Exception is org.apache.jetspeed.portlet.PortletException: BeanUtils.populate at com.ibm.wps.portlets.struts.WpsStrutsPortlet.actionPerformed(WpsStrutsPortlet.java:1280) at com.ibm.wps.pe.pc.legacy.SPIPortletInterceptorImpl.handleEvents(SPIPortletInterceptorImpl.java:438) at org.apache.jetspeed.portlet.Portlet._dispatch(Portlet.java:794) Anyone whos knows absolutly anything on this problem, Please do let me know...I have no clue why the jsp is behaving so indifferently. Thanks in advance....
|
 |
Ashish Tahasildar
Greenhorn
Joined: Dec 10, 2006
Posts: 12
|
|
Hi, Are you using <html:file> tag or <html:file name="FormName" property="cvsFile"/> ? If you are simply using <html:file> please use the property name also. Reply me Regards, Ashish
|
 |
 |
|
|
subject: Portlets with Struts File Upload Trouble
|
|
|