This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of DevSecOps Adventures: A Game-Changing Approach with Chocolate, LEGO, and Coaching Games and have Dana Pylayeva on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

problem with enctype attribute in jsp

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We have a Struts specific forum.
I'll move this thread to that forum for you.
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
The first person to drink cow's milk. That started off as a dare from this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic