package servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import che.dao.impl.chaxunDAOImpl; public class del12servlet extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; public del12servlet() { super(); } public void destroy() { super.destroy(); // Just puts "destroy" string in log // Put your code here } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request,response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.setCharacterEncoding("UTF-8"); int zhi =Integer.parseInt(request.getParameter("id")); chaxunDAOImpl cha=new chaxunDAOImpl(); response.setContentType( "text/html;charset=utf-8 "); PrintWriter out = response.getWriter(); try{ cha.del10(zhi); out.print("<script>" + "alert('删除成功!');"+ "document.location.href='../fankuixinxi1.jsp';"+ "</script>"); out.close(); return; }catch(Exception e){ System.out.println(e.getMessage()); out.print("<script>" + "alert('删除失败!');"+ "document.location.href='../fankuixinxi1.jsp';"+ "</script>"); out.close(); return; } } public void init() throws ServletException { // Put your code here } }
最近下载更多
微信网友_6050164023693312 LV2
2023年12月27日
刘洋66666 LV1
2023年11月5日
adap12345 LV5
2023年6月15日
berty boom LV4
2023年6月12日
846488283 LV4
2023年5月29日
泓鼎168 LV19
2023年3月31日
北方菜 LV11
2022年12月30日
2385649653 LV7
2022年11月4日
huwenxuan LV6
2022年6月22日
testuser1234567 LV24
2022年6月15日
最近浏览更多
m5433660 LV1
昨天
maniheim LV7
2月7日
lilong007 LV20
2023年12月30日
hxy19991216 LV4
2023年12月29日
微信网友_6050164023693312 LV2
2023年12月27日
asddwh LV12
2023年12月26日
zn2020 LV1
2023年12月18日
微信网友_6767210516385792
2023年12月6日
暂无贡献等级
逝水莲花 LV7
2023年12月3日
Ghost19850101
2023年11月24日
暂无贡献等级