I having the problem while compiling the my project in eclipse. It was shoving the error The import org.apache.commons cannot be resolved.
Please anyone tell me what does this error tells. and how to solve it.
This question is related to
eclipse
servlets
apache-commons-fileupload
expand "Java Resources" and then 'Libraries' (in eclipse project). make sure that "Apache Tomcat" present.
if not follow- right click on project -> "Build Path" -> "Java Build Path" -> "Add Library" -> select "Server Runtime" -> next -> select "Apache Tomcat -> click finish
You could just add one needed external jar file to the project. Go to your project-->java build path-->libraries, add external JARS.Then add your downloaded file from the formal website. My default name is commons-codec-1.10.jar
Look for "poi-3.17.jar"!!!
Problem solved and errors disappeared.
If you got a Apache Maven project, it's easy to use this package in your project. Just specify it in your pom.xml
:
<project>
...
<properties>
<version.commons-io>2.4</version.commons-io>
</properties>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${version.commons-io}</version>
</dependency>
</dependencies>
...
</project>
You could also add the external jar file to the project. Go to your project-->properties-->java build path-->libraries, add external JARS. Then add your downloaded jar file.
Source: Stackoverflow.com