java.lang.ClassNotFoundException: org.apache.commons.fileupload.FileItemFactory

前端 未结 2 1250
[愿得一人]
[愿得一人] 2020-12-04 00:29

I am trying to compile UploadServlet servlet via apache tomcat 8.0.14. my web.xml is fine andUploadServlet.java has compiled properly but yet when

相关标签:
2条回答
  • 2020-12-04 01:09

    You need to put commons-fileupload.jar and commons-io.jar to your WEB-INF/lib forlder. Classpath is used during build, but they must be available during runtime also.

    Actually, if you had used IDE for Java EE development (like Eclipse) putting these Jars to WEB-INF/lib would be enough, as they would be automatically visible in the claspath for build.

    0 讨论(0)
  • 2020-12-04 01:17

    as @Gas , I forgot to add .jar file in WEB-INF/lib folder. and then the issue resolved.

    0 讨论(0)
提交回复
热议问题