1.创建一个类,继承HttpServlet类,并覆写doGet()/doPost()方法(根据页面请求方式而定)
2.在web.xml中 添加映射关系
3.然后运行项目,浏览器请求 127.0.0.1:8080/Servlet_01/hello
servlet创建
最新推荐文章于 2024-01-31 22:51:28 发布
1.创建一个类,继承HttpServlet类,并覆写doGet()/doPost()方法(根据页面请求方式而定)
2.在web.xml中 添加映射关系
3.然后运行项目,浏览器请求 127.0.0.1:8080/Servlet_01/hello