Hi! In my JSP page i have an upload form and i want to store the image from the form to the database(Oracle). I tried the following:

FormFile myFile = (FormFile)form.get("myFile");
byte[] fileData = myFile.getFileData();

I get the following exception:

org.apache.commons.beanutils.ConversionException: Cannot assign value of type 'java.lang.String' to property 'myFile' of type 'org.apache.struts.upload.FormFile'
org.apache.struts.action.DynaActionForm.set(DynaAc tionForm.java:424)
org.apache.commons.beanutils.PropertyUtils.setSimp leProperty(PropertyUtils.java:1769)
org.apache.commons.beanutils.PropertyUtils.setNest edProperty(PropertyUtils.java:1684)
org.apache.commons.beanutils.PropertyUtils.setProp erty(PropertyUtils.java:1713)
org.apache.commons.beanutils.BeanUtils.setProperty (BeanUtils.java:1019)
org.apache.commons.beanutils.BeanUtils.populate(Be anUtils.java:808)
org.apache.struts.util.RequestUtils.populate(Reque stUtils.java:495)
org.apache.struts.action.RequestProcessor.processP opulate(RequestProcessor.java:798)
org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:205)
org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1164)
org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:415)
javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

Please help me with this!

Thank you very much