I had to add these libraries in the build path after which it worked. Eclipse did not do it by itself.
"The import org.apache.commons.fileupload cannot be resolved" does not go off despite adding lib
-
31-03-2022 - |
题
When I try to import
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
Eclipse shows an error,
The import org.apache.commons.fileupload cannot be resolved
I added these libraries but still this error does not go off.
commons-fileupload-1.3.jar
commons-fileupload-1.3-javadoc.jar
commons-fileupload-1.3-sources.jar
commons-fileupload-1.3-tests.jar
commons-fileupload-1.3-test-sources.jar
How should I correct this error?
解决方案
其他提示
You have to add these libraries at 2 places. To build path of the project and in /WEB-INF/lib folder
不隶属于 StackOverflow