"The import org.apache.commons.fileupload cannot be resolved" does not go off despite adding lib

StackOverflow https://stackoverflow.com/questions/15733808

  •  31-03-2022
  •  | 
  •  

Frage

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?

War es hilfreich?

Lösung

I had to add these libraries in the build path after which it worked. Eclipse did not do it by itself.

Andere Tipps

You have to add these libraries at 2 places. To build path of the project and in /WEB-INF/lib folder

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top