1.创建一个类,继承HttpServlet类,并覆写doGet()/doPost()方法(根据页面请求方式而定)
servlet创建
2.在web.xml中 添加映射关系
servlet创建
3.然后运行项目,浏览器请求 127.0.0.1:8080/Servlet_01/hello
servlet创建
servlet创建

相关文章: