commons-fileupload使用问题
使用commons-fileupload组件
但是发现网上的例子全都报一个错误
java.lang.NoClassDefFoundError: org/apache/commons/io/output/DeferredFileOutputStream
org.apache.commons.fileupload.DefaultFileItemFactory.createItem(DefaultFileItemFactory.java:102)
org.apache.commons.fileupload.FileUploadBase.createItem(FileUploadBase.java:500)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:367)
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:268)
org.apache.jsp.upload_jsp._jspService(org.apache.jsp.upload_jsp:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
我应该如何解决?
包已经导入了
commons-fileupload-1.1.1.jar
commons-io-1.2.jar
这2个包
------解决方案--------------------commons-fileupload-1.1.1.jar
commons-io-1.2.jar
你看看这两个包是不是兼容,象现在新出来的commons-fileupload-1.2只能和commons-io-1.3兼容一样