Language/JSP
session
태윤2
2020. 6. 2. 12:26
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<%
session.invalidate();//세션 전체 삭제
session.removeAttribute("키값"); //세션 한개 삭제
formId.equals(dbId); // jsp에서 동등 비교 ( ==)
session.setAttribute("키값", "저장할값"); // 세션값 저장 session.setAttribute
%>
</body>
</html>
|
cs |