IDEA生成servlet IDEA生成servlet程序的实现步骤
SammeryD 人气:0想了解IDEA生成servlet程序的实现步骤的相关内容吗,SammeryD在本文为您仔细讲解IDEA生成servlet的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:IDEA生成servlet,下面大家一起来学习吧。
1.创建Servlet
2.配置servlet信息
3.配置web.xml
4.根据业务需求更改doPost和doGet方法
package com.sammery.Servlet; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * @Author: SammeryD * @Date: Created in 10:48 2020/8/17 */ public class helloServlet2 extends HttpServlet { protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } }
加载全部内容