240102 HTML Delete.java
2024. 1. 4. 16:07ㆍ2023.11.21-2024.05.31
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package com.sukgi.web;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.sukgi.dao.BoardDAO;
@WebServlet("/delete")
public class Delete extends HttpServlet {
private static final long serialVersionUID = 1L;
public Delete() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//response.getWriter().append("Served at: ").append(request.getContextPath());
String no = request.getParameter("no");
BoardDAO dao = new BoardDAO();
dao.delete(no);
//페이지 이동
response.sendRedirect("./index.jsp");
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//doGet(request, response);
}
}
|
cs |
'2023.11.21-2024.05.31' 카테고리의 다른 글
240102 웹 만들기 ; Test.java (1) | 2024.01.04 |
---|---|
240102 HTML Study.java (1) | 2024.01.04 |
240102 HTML DBConnection.java (1) | 2024.01.04 |
240102 HTML BoardDAO.java (0) | 2024.01.03 |
240102 HTML write.css (0) | 2024.01.03 |