This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with enctype attribute in jsp

 
venkateshwar rao ravula
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,

I am trying to upload the file using struts,if i use the enctype="multipart/form-data" attribute in the jsp iam getting following error.

[[action]] Servlet.service() for servlet action threw exception
java.lang.NoSuchMethodError: org.apache.commons.fileupload.FileUpload.setSizeMax(I)V

please help me to come out of thi problem.

Thanks
Rvrao
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have a Struts specific forum.
I'll move this thread to that forum for you.
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are some things to check:

1-Make sure that there is a commons-fileupload.jar file in your WEB-INF/lib directory and make sure it's the one that came with the same Struts download as your struts.jar file.

2-Make sure that you don't have any commons-xxx.jar files in common lib directories used by all applications. This would cause it to be loaded by a different ClassLoader than strus, and could cause problems.

If you've verified the above and are still getting the error, post your JSP code (at least the <html:form> tag and the <html:file> tags) as well as the relevant portions of your struts-config.xml file and your ActionForm bean. We'll then have more information to help you solve this.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic