Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6618017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:46:29+00:00 2026-05-25T20:46:29+00:00

I want to uploal a doc file to the servlet using commons-fileupload-1.2.2. I’m using

  • 0

I want to uploal a doc file to the servlet using commons-fileupload-1.2.2.

I’m using this code in the front end:

<form action="fileuploader" method="post" enctype="multipart/form-data">
<br>File : <input type="file" name="uploadedFile">
<br><input type="submit">

and using this code in the servlet:

protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    // TODO Auto-generated method stub
    boolean isMultipart = ServletFileUpload.isMultipartContent(request);
}

but system gives me a this error

SEVERE: Servlet.service() for servlet FileUploaderServlet threw exception
java.lang.ClassNotFoundException: org.apache.commons.fileupload.servlet.ServletFileUpload
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526)
    at org.jspFileUploader.fileUploader.FileUploaderServlet.doPost(FileUploaderServlet.java:31)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:291)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Unknown Source)

I think problem is in this line:

boolean isMultipart = ServletFileUpload.isMultipartContent(request);

Help me with this please

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:46:29+00:00Added an answer on May 25, 2026 at 8:46 pm

    You need to drop the commons-fileupload.jar and commons-io.jar files in /WEB-INF/lib folder of your webapp project. This folder becomes ultimately part of webapp’s runtime classpath. Note that in a bit decent IDE like Eclipse/Netbeans/IntelliJ, you do not need to fiddle with buildpath properties afterwards. The IDE is perfectly aware that libraries in /WEB-INF/lib are to be taken part of the runtime classpath, so it adds that to the build path automagically.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to upload files directly to IIS7 (in this case I am using
I want to upload a text file received via AJAX request in Symfony2 (using
I use this jQuery code to validate a file upload event. It's successful. But
I want to upload a static file on my drive like C:\someplace\somefile.doc THe file
I want to upload and then process a file in a Ruby on Rails
i want to upload the sound file (.ogg) in server. But it should write
I want to upload and store video files to my server using PHP. Could
I want to upload upload up to 100 MB to 1GB file onto sharepoint
I want to upload a file to a ftp server programmatically (C++). If the
i want to make some .doc files with some entries in a database. here

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.