Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / September 2006

Tip: Looking for answers? Try searching our database.

Help with Jakarta File Upload and Apache Tomcat

Thread view: 
nushio@gmail.com - 08 Sep 2006 04:42 GMT
Hello.

I've been searching for a simple way to upload a file to a webserver,
and found Jakarta Commons FileUpload as an easy solution.

My problem, however, is that it isnt found on run-time.

"java.lang.NoClassDefFoundError:
org/apache/commons/fileupload/FileUploadException" is the Root Cause.

I have already set up the commons-fileupload-1.1.1.jar on the Eclipse
build path, and a copy of it on web-inf\lib.

All this has left me right where I started, stuck without uploading
files. Any help is greatly appreciated.

-Nushio
Manish Pandit - 08 Sep 2006 04:51 GMT
Hi,

Did you restart your tomcat/redeploy your webapp after doing so? To be
sure, put the jar in $TOMCAT_HOME\server\lib too and bounce tomcat.

-cheers,
Manish

> Hello.
>
[quoted text clipped - 13 lines]
>
> -Nushio
nushio@gmail.com - 08 Sep 2006 05:01 GMT
Thanks for your quick response.

Yes, I did restart tomcat, cleaned and re built the webapp, and I just
placed commons-fileupload-1.1.1.jar on $TOMCAT_Home\server\lib, with no
luck, same error.

Any other suggestions?

TIA!
-Nushio
> Hi,
>
[quoted text clipped - 21 lines]
> >
> > -Nushio
Manish Pandit - 08 Sep 2006 05:44 GMT
Can you post the exception trace, with the code snippet that causes it?
Nushio - 08 Sep 2006 06:28 GMT
Thanks to Manish Pandit, I've managed to fix my error.

I'm posting here in case anyone else stumbles upon this problem.

I had placed the lib file inside the web-inf folder, but that was the
problem. Instead, I should have imported it via Eclipse, as a Jar, and
NOT as an External Jar.

Once that was done, the program executed succesfully.

Thanks again, Manish!
-Nushio
> Can you post the exception trace, with the code snippet that causes it?


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.