commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Chapple <ryan.chap...@gmail.com>
Subject NoSuchMethodError on ServletFileUpload
Date Thu, 29 Dec 2005 04:46:54 GMT
Hey there,

I was using v1.0 and had a nice little test servlet running -- I upgraded to
the v1.1 jar, and now am having a few problems.  I've read the previous
posts about making sure that the import statements are right and all, and I
think I've got that covered.

My problem is that when I go to invoke parseRequest on my newly-minted
ServletFileUpload object, I get a NoSuchMethod error.

here's the code inside my doPost method:

<code>

List items = null; // A list of uploaded files

// Create a new file upload handler
        ServletFileUpload upload = new ServletFileUpload();

// Parse the request
        try {
            items = upload.parseRequest(request);   // <-- Blows up here
        } catch (FileUploadException e) {
            e.printStackTrace();
        }

</code>

here's the full error as reported by Tomcat:

java.lang.NoSuchMethodError:
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(Lorg/apache/commons/fileupload/RequestContext;)Ljava/util/List;

	org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:116)
	com.envolve.web.FileUploadServlet.doPost(FileUploadServlet.java:54)
	javax.servlet.http.HttpServlet.service(HttpServlet.java
:709)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


I'm sure it's something simple that I'm missing, but your help is
appreciated!!

Thanks,

Ryan

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message