Eclipse create servlet file error

When creating a web project in eclipse, an error is reported when creating a JSP or servlet file, as follows:

the error is: the superclass“ javax.servlet.http . httpservlet “was not found on the Java build path“ javax.servlet.http The. Httpservlet “class cannot be found in the project’s build path, that is, there is no class to send and receive requests.
If you look at the error reported by the servlet file:

is also the error caused by the lack of servlet related classes.
The specific solution is:
right click on the specific project — & gt; select Properties — & gt; select “Java build path”, and then follow the steps below:

Click next, select the server, click Finish

and then click “apply and close”.


Read More: