I use Maven for including servlet-api
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
And other packages seem to work perfectly fine (e.g. javax.servlet.http.*) But when it comes to javax.servlet.jsp.tagext compiler does not see it. Application is deployed on Tomcat 9.0.55.
CodePudding user response:
You need to add javax.servlet.jsp-api
to your project. This contains the required package.
<!-- https://mvnrepository.com/artifact/javax.servlet.jsp/javax.servlet.jsp-api -->
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.3</version>
<scope>provided</scope>
</dependency>
It also include the dependency to javax.servlet-api
, so you do not need it explizitly in your project.