The open source project which I want to use needs to import:
import javax.servlet.*;
import javax.servlet.http.*;
As far as I know those libraries are part of the Java EE. So I installed Java EE from this location: http://www.oracle.com/technetwork/java/javaee/downloads/java-ee-sdk-7-jdk-7u21-downloads-1956231.html . After installing Java EE and rebooting I still get information about unresolved imports. What should I do to make those errors disappear?
Right-click your project, click on properties->Java Build path->Libraries tab->click Add External JARs->Browse for servlet-api. jar and select it->click OK to update the build path. Right-click the project, click properties->Java Build Path->click ADD JARs->find servlet-api.
It contains, among others, the files /usr/share/java/servlet-api-2.5. jar and /usr/share/java/jsp-api-2.1. jar , which are the servlet and JSP libraries you need.
please cross check if your eclipse is pointing to JDK and not JRE
check in build path, it has to point to JDK change if it is pointing to JRE
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With