Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

file uploading problem PLZ HELP ME OUT

 
java freak
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
i am having 3 jsp pages and for alll 3 jsps only one form BEAN
and in my first JSP i am having the file upload
i am able to upload the file into DATABASE successfully also
but my problem comes next
after uploading when i click tab to goto next jsp
the next JSP alo displayed properly
but from there onwards when i clik on any button on any tab for moving to other JPSs
i am getting the following eroor


java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:924)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729)
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1097)
at org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:798)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1422)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:523)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:996)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:419)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:315)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6452)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3661)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2630)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)



and i tried all most all the possibilities
i declared the following thing in all the 3 jsps

<html:form action="/esmtLevel" enctype="multipart/form-data" styleId="estimateLevel012Form" >



my getter and setter methods are

public FormFile getPartImage() {
return partImage;
}

public void setPartImage(FormFile partImage) {
this.partImage = partImage;
}



and i declared bean field as FORMFILE element only

form past 2 days i was having problem vth this one
and any help would be appereciated[
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try using the ActionForm bean with the FormFile attribute only with the JSP that actually performs a file upload. Use an ActionForm that does not contain this attribute for the other JSPs.
 
java freak
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i can't wirte three different forms
why because i am moving back and fourth very frequently and when i move like this i need to keep up the values alive when i move back and fourth
i.e when user comes to that screen once again he has to get the values what ever he selected in the begning
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic