一、手工创建
1.继承HttpServlet
2.重写doGet()或者doPost()
3.在web.xml中注册Servlet
二、MyEclipse
1.src->new->servlet
3.部署运行