首页>代码>基于MVC模式的Java web增删改查简单实例>/LOLHero/src/servlet/HeroDeleteServlet.java
package servlet;

import dao.HeroDAO;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
* @author 作者: guya
* description:
*/
public class HeroDeleteServlet extends HttpServlet {

    protected void service(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException {
        int id = Integer.parseInt(request.getParameter("id"));
        new HeroDAO().delete(id);

        response.sendRedirect("listHero");

    }
}
最近下载更多
liuliuyl  LV3 2023年6月17日
小顾顾顾顾顾  LV4 2023年6月7日
ZDM133  LV2 2023年5月22日
人生三重奏  LV1 2022年12月21日
无名氏111  LV32 2022年12月16日
1379585889  LV11 2022年12月14日
bigstone1  LV1 2022年11月9日
微信网友_6208827097387008  LV1 2022年11月7日
sdkjfhg  LV1 2022年3月6日
guanxiaopeng  LV1 2021年12月21日
最近浏览更多
无敌最俊朗啊  LV2 2023年12月29日
asddwh  LV12 2023年12月25日
颜菜菜  LV2 2023年12月23日
CCCCWWWW  LV4 2023年12月11日
jkjfdgbkl  LV2 2023年11月1日
graceful 2023年10月18日
暂无贡献等级
Iris彩虹女孩  LV1 2023年8月12日
asadda  LV2 2023年6月27日
liuliuyl  LV3 2023年6月17日
KAIzx11  LV7 2023年6月13日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友