[Eclipse]–Error:The superclass “javax.servlet.http.HttpServlet” was not found on the J…

After a period of time without eclipse, I went to open the previous project and found that the front line was marked red. When viewing errors, as shown in the figure below:

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

It turned out to be “no super ‘javax servlet. Http. Httpservlet’ was found on the Java build path”

Therefore, right click on the original error item & gt> Build Path>> Configure build path to configure the project. As shown in the figure:

Add Library—->> Server runtime (configure the server to run)

After that, you have finished the project deployment and the server you want to run! But it hasn’t solved the problem yet

you also need to deploy JRE (Java runtime environment) runtime environment and some related LIBS… Finally, apply and close. As shown in the figure:

This solves those red errors

Similar Posts: