• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

File Upload

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 jboss4, I'm pretty sure my classpaths are ok - I put the commons jar into the shared lib folder of jboss )

any help would be really appreciated.

java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
fileupload.FileUpload.doPost(FileUpload.java:36)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looks like you don't have either servlet.jar or servlet-api.jar on your classpath.

If you're using Tomcat then servlet-api.jar is in TOMCAT_HOME/common/lib
 
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I noticed that you've actually posted to several other sites with the same question. Hope my answer could calm you down somewhat.

I'd suspect it is a classpath problem. As my eclipse is currently giving me some problem, I could not check if I have a classpath for servlet-api.jar or the like.

If you're in desperation (judging from the numerous sites you've posted the question, I think you are), why not add all apparent servlet jars such as servlet-api.jar from \\[jboss-4]\server\all\deploy\jbossweb-tomcat50.sar to your project classpath?

When things regain normalcy, then you could use binary elimination to elimate those jar files that have no effect ?

Caveat: Just make sure that you don't include jar files of duplicate packages that belongs to different versions. I made that mistake once, and it was very painful.

Originally posted by Yu Tao:
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 jboss4, I'm pretty sure my classpaths are ok - I put the commons jar into the shared lib folder of jboss )

any help would be really appreciated.

java.lang.NoClassDefFoundError: javax/servlet/ServletInputStream
fileupload.FileUpload.doPost(FileUpload.java:36)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)



[ April 17, 2005: Message edited by: Ken Loh ]
[ April 17, 2005: Message edited by: Ken Loh ]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic