Flávio Maldonado wrote:
Hello

I'm having a problem to upload a file using struts...
I search for the error at Google... but I didn't solve my problem yet.
I have this JSP:

<html:form action="/foto" enctype="multipart/form-data">
<tr>
 <td>

 <table cellpadding="0" cellspacing="15" width="100%">
  <tr>
<td width="50%" align="right"><html:file property="theFile" size="40"/></td>
  </tr>
  <tr>
   <td width="50%" align="right"><html:submit value="Ok"/></td>
  </tr>
 </table>  </td>
</tr>
</html:form>

when I click in Ok button to call the action class, the servlet throws an exception:

java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUpload.setSizeMax(I)V at org.apache.struts.upload.CommonsMultipartRequestHandler.handleRequest(Common sMultipartRequestHandler.java:220) at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:934) at

I got the struts-upload.war example and it works fine... but my application didn't! I don't know what i'm doing wrong...
I put the struts.jar and commons-upload.jar in the classpath....
I think this is a detail... but I'm not seeing what I'm doing wrong.

Something can help me?

I'd guess you have the wrong version of commons-upload.jar deployed. Check you're using the right version, and that there isn't another version elsewhere on the classpath of either your application or your servlet container.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to