If your IDE produces an error like javax.servlet.jsp cannot be resolved to a type
you shuold include the jsp-api
dependency to solve that:
<dependency> <groupId>javax.servlet</groupId> <artifactId>jsp-api</artifactId> <version>2.0</version> <scope>provided</scope> </dependency>
Make sure that the scope is provided
, because the servlet container that we use to run our project will provide this dependency. This is because the jsp-api is not required when compiling your project, it is only needed when you run the project (aka it is a runtime dependency).
For me, this error came up in STS (which is a variation of Eclipse), but you can expect it in other IDEs as well.