
Creating Java packageUnder src directory, create a new Java package called. The project is created with some skeleton code. Select 2.5 from the dropdown list Dynamic web module version:Ĭlick Finish. In the dialog New Dynamic Web Project, type UploadServletApp as Project name. Creating new projectIn Eclipse’s Java EE perspective, select File > New Dynamic Web Project from main menu. For Servlet 3.0 or later, we recommend this article: How to write upload file servlet with Servlet 3.0 API.

NOTES: In this tutorial, we target the application to Servlet 2.5 environment. These JAR files will be used in the project.

Likewise, the Commons IO library is a dependency for the Common File Upload library, and make sure you got the JAR file commons-io-2.3.jar after extracting the zip file. After downloading the Common File Upload library, extract the zip file to a desired location, and make sure you got a JAR file called commons-fileupload-1.2.2.jar under lib directory. If you don’t have one of the above software installed, download and install them by clicking on an individual link.

Setting up environmentBefore moving on, make sure you got the following software installed on your computer (of course you can use newer versions):

