controller/member/Logout.java
페이지 정보
본문
package controller.member;
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 javax.servlet.http.HttpSession;
@WebServlet("/member/logout")
public class Logout extends HttpServlet {
private static final long serialVersionUID = 1L;
public Logout() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
// 모든 세션 삭제
session.invalidate();
// 첫 화면 이동
response.sendRedirect("/");
}
}
- 이전글controller/member/Login.java 23.03.17
- 다음글controller/member/MemberJoin.java 23.03.17
댓글목록
등록된 댓글이 없습니다.