Or to the following tomcat lib directory to find the package, and then in eclipse, right-click the project, select
the Java
Build Path> the Libraries> the Add External JARS, find tomcat installation path in your computer, in the common \ lib folder, select "servlet-api.jar", adding click "OK" on the line.
There are problems, then copy servlet-api.jar to the project lib directory is just great.
![](https://img2018.cnblogs.com/i-beta/1887405/201912/1887405-20191226234923871-976266073.png)