1

I have a problem with my Intellij project.

Screenshot

I've already updated my Java JDK and JRE. Someone have another solution?

Thanks.

6
  • Do you have mvnrepository.com/artifact/javax.servlet/servlet-api attached to your sources? Commented Aug 1, 2018 at 9:33
  • Try with this link: stackoverflow.com/questions/25589152/… Commented Aug 1, 2018 at 9:34
  • jetbrains.com/help/idea/… Commented Aug 1, 2018 at 9:35
  • May be you need following dependency <dependencies> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>4.0.1</version> <scope>provided</scope> </dependency> </dependencies> Commented Aug 1, 2018 at 9:36
  • Already did this solutions. But none of them works. Commented Aug 1, 2018 at 9:39

2 Answers 2

2

If you have already imported this project as maven. Do mvn idea:idea

Else add framework support > maven and then do mvn clean/mvn idea:idea

Sign up to request clarification or add additional context in comments.

2 Comments

It's not imported as maven.
If its not maven, is it some other build framework like gradle?
1

If you do not use Mven or Gradle for dependency management, add the dependency on the javax.servlet-api.jar to the module's dependencies manually.

If you use application server (e.g. Tomcat) you should to define it in IDE and IDE will create java-ee library that you can then add to the module's dependencies:

enter image description here

enter image description here

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.