Publish a servlet project on eclipse

Preliminary preparation

  1. eclipse
  2. The Tomcat server of the corresponding version has been configured on eclipse

The first step is to create a new dynamic project

Insert picture description here

The second step is to create a new Servlet

Insert picture description here
Insert picture description here

Insert picture description here

Continue to next, below you can choose the method you want to implement or overload
Insert picture description here

This will build a servlet

Possible problem

The jar package of the Servlet is not imported

Insert picture description here
In a situation like this, the error message indicates that the jar package is not imported. We can solve this problem.
Insert picture description here
Insert picture description here
Find the lib folder under the Tomcat installation directory, which stores the relevant jar packages needed for JavaEE development.
Insert picture description here

Publish the project

Insert picture description here

Insert picture description here

Enter your servlet name, you can
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_34902437/article/details/104193953