Java web 中的会遇到的小问题之一(Multiple annotations found at this line)

新建jsp文件报错。

Multiple annotations found at this line:

- The superclass "javax.servlet.http.HttpServlet" was not found on the Java 
Build Path
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java 

Build Path

问题解决过程如图:

1、鼠标右键项目,【build path】——>【configure build path】。

Java web 中的会遇到的小问题之一(Multiple annotations found at this line)

2、【Java build path】——>【add library】

Java web 中的会遇到的小问题之一(Multiple annotations found at this line)

3、【server runtime】——>【next】

Java web 中的会遇到的小问题之一(Multiple annotations found at this line)

4、【Apache Tomcat v8.5】(选择自己配置的Tomcat即可。)——>【finish】

Java web 中的会遇到的小问题之一(Multiple annotations found at this line)

5、【apply and close】。

Java web 中的会遇到的小问题之一(Multiple annotations found at this line)