Hi
I am using Struts 1.1 and by the help of AJAX I wants to upload file at the run time. When I am accessing entire Form with table of contents(fields) from Action Class then by submitting all the details It is giving error message like this
javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(Reque stUtils.java:1254)
org.apache.struts.action.RequestProcessor.processP opulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(Actio nServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet .java:690)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
root cause
java.lang.IllegalArgumentException: argument type mismatch
sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.commons.beanutils.PropertyUtils.setSimp leProperty(PropertyUtils.java:1789)
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:1252)
org.apache.struts.action.RequestProcessor.processP opulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
org.apache.struts.action.ActionServlet.doGet(Actio nServlet.java:507)
javax.servlet.http.HttpServlet.service(HttpServlet .java:690)
javax.servlet.http.HttpServlet.service(HttpServlet .java:803)
My aim is to Fill Different Forms with in a single JSP Page at the Run Time by replacing one Form by another.
Pls See the attachments where I am taking a JSP Page(upload.jsp)in which there is a submit button (UploadFile) & by pressing this Button request goes goes through JavaScript Function to UploadFile Method of the UploadAction Class which returns a Form then by browsing any file when I am pressing SaveFile submit Button then it gives this error message.