Article:
  Using the Jakarta Commons, Part 1
Subject:   File Upload
Date:   2004-04-28 02:24:15
From:   doco
Hi I'm not sure if this is the correct place to post this, but I've seen the same problem posted elsewhere on the web and seen it left unresolved.


This is the error I get when I try just to instansiate ( DiskFileUpload d = new DiskFileUpload() ),


I've tried almost everything with it, please help!! ( ps: I'm using eclipse and tomcat5, I'm pretty sure my classpaths are ok - I put the commons jar into the shared lib folder of Tomcat )


any help would be really appreciated.


java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
GameUploadServlet.doGet(GameUploadServlet.java:56)
javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • File Upload
    2005-01-14 05:38:34  hanselowen [View]

    I have exactly the same problem and I dont find the solution. Did you find it?
    • File Upload
      2005-05-25 09:11:19  siniestroso [View]

      well, it seems that the problem is that you misplaced the fileupload jar.

      Did you include it in the jvm's classpath?

      Try using the /shared/lib on tomcat's file tree
    • File Upload
      2005-05-25 09:07:44  siniestroso [View]

      Well, the problem seems to be that you misplaced the fileupload jar in the tomcat's classpath.

      The servletInputStream class is part of the tomcat's implementation, and it must be visible for the fileuploader classes.

      Did you put the jar in the jvm classpath?

      Try moving it to the /shared/lib of tomcat's file tree.