I put commons-fileupload-1.1.jar into WEB-INF/lib directory, but receive same error:(
-----Original Message----- From: Martin Cooper <[EMAIL PROTECTED]> To: Jakarta Commons Users List <[email protected]>, Дмитрий Можейко <[EMAIL PROTECTED]> Date: Fri, 13 Jan 2006 08:57:49 -0800 Subject: Re: FileUpload: java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream > You need to put the Commons FileUpload jar (and the Commons IO jar) in the > WEB-INF/lib directory of your web app. The problem you are seeing is almost > certainly because you are trying to use FileUpload from a shared location > instead of including it in your web app. > > -- > Martin Cooper > > > On 1/13/06, Дмитрий Можейко <[EMAIL PROTECTED]> wrote: > > > > I wrote web-application with servlet to file uploading. > > > > This is code-fragment: > > > > ... > > 41: FileItemFactory factory = new DiskFileItemFactory(); > > > > 43: ServletFileUpload upload = new ServletFileUpload(factory); > > > > 45: List items = upload.parseRequest(request); > > ... > > > > I put commons-fileupload-1.1.jar ${APPSRVHOME}/domains/domain1/lib/ext/ > > directory and success fully deploy it into Sun Java System Application > > Server Platform Edition 8.1_02 (build b06-fcs) > > > > but i receive this runtime error: > > > > java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream > > > > org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest( > > ServletFileUpload.java:116) > > web.UploadServlet.processRequest(UploadServlet.java:45) > > web.UploadServlet.doPost(UploadServlet.java:74) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:767) > > javax.servlet.http.HttpServlet.service(HttpServlet.java:860) > > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > sun.reflect.NativeMethodAccessorImpl.invoke( > > NativeMethodAccessorImpl.java:39) > > sun.reflect.DelegatingMethodAccessorImpl.invoke( > > DelegatingMethodAccessorImpl.java:25) > > java.lang.reflect.Method.invoke(Method.java:585) > > org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java > > :249) > > java.security.AccessController.doPrivileged(Native Method) > > javax.security.auth.Subject.doAsPrivileged(Subject.java:517) > > org.apache.catalina.security.SecurityUtil.execute( > > SecurityUtil.java:282) > > org.apache.catalina.security.SecurityUtil.doAsPrivilege( > > SecurityUtil.java:165) > > > > > > Why? > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
