eclipse web工程出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path解决办法

eclipse web工程在没有引入tomcat相应运行时环境的时候,会出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path的错误,如下图所示:

image.png

解决办法如下:
第一步:配置server runtime

image.png
image.png
image.png

第二步:在出现此错误的项目上单击鼠标右键》Build Path》Configure Build Path

image.png
image.png

选择刚创建的runtime server即可

image.png
image.png

你可能感兴趣的:(eclipse web工程出现The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path解决办法)