I found sometimes even with the right dependencies, Eclipse can still raise the error. Below are the methods I used to make Eclipse update:
Method 1 : Copy paste jsp.
error happens for jsp in deeper layer
I also find a strange situation that when the same jsp is deeper in my directory, its taglibs cannot be found. However, when it is under /webapp/ it has no issue.
I tried maven clean, maven build, project clean, all cannot resolve the problem.
I resolved it by deleting the jsp with error can copy the correct jsp from outer folder to inner folder again. Then the taglibs can be recognized.
jsp error resolved after copy paste jsp in outer folder
Therefore, I think it could be a bug by Eclipse itself.
My dependencies are like
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
Method 2 : change version of jstl and change back
try change version of jstl, then maven clean and maven update, then change back the version and maven clean again.