使用servlet的步骤 1. 创建普通的 Java 类并继承 HttpServlet; 2. 覆写 service 方法; 3.在 service 方法中书写逻辑代码; 4. 在 WEB-INF 目录下的 web.xml 中配置 servlet