<%
@page
import
=
"java.util.Enumeration"
%>
<%@ page language=
"java"
contentType=
"text/html; charset=UTF-8"
pageEncoding=
"UTF-8"
%>
<html>
<head>
<script type=
"text/javascript"
>
if
(!window.T) { window.T = {} }
window.T.config = {
"TOP_SSL_URL"
:
"https://www.tistory.com"
,
"PREVIEW"
:
false
,
"ROLE"
:
"guest"
,
"PREV_PAGE"
:
""
,
"NEXT_PAGE"
:
""
,
"BLOG"
:{
"id"
:
2750468
,
"name"
:
"rongscodinghistory"
,
"title"
:
"악덕고용주의 개발 일기"
,
"isDormancy"
:
false
,
"nickName"
:
"고무곰(GomuGom)"
,
"status"
:
"open"
,
"profileStatus"
:
"normal"
},
"NEED_COMMENT_LOGIN"
:
true
,
"COMMENT_LOGIN_CONFIRM_MESSAGE"
:
"이 블로그는 로그인한 사용자에게만 댓글 작성을 허용했습니다. 지금 로그인하시겠습니까?"
,
"LOGIN_URL"
:
"https://www.tistory.com/auth/login/?redirectUrl=http://rongscodinghistory.tistory.com/category/%25EC%258A%25A4%25ED%2584%25B0%25EB%2594%2594/JSP"
,
"DEFAULT_URL"
:
"https://rongscodinghistory.tistory.com"
,
"USER"
:{
"name"
:
null
,
"homepage"
:
null
,
"id"
:
0
,
"profileImage"
:
null
},
"SUBSCRIPTION"
:{
"status"
:
"none"
,
"isConnected"
:
false
,
"isPending"
:
false
,
"isWait"
:
false
,
"isProcessing"
:
false
,
"isNone"
:
true
},
"IS_LOGIN"
:
false
,
"HAS_BLOG"
:
false
,
"IS_SUPPORT"
:
false
,
"IS_SCRAPABLE"
:
false
,
"TOP_URL"
:
"http://www.tistory.com"
,
"JOIN_URL"
:
"https://www.tistory.com/member/join"
,
"PHASE"
:
"prod"
,
"ROLE_GROUP"
:
"visitor"
};
window.T.entryInfo =
null
;
window.initData = {};
window.TistoryBlog = {
basePath:
""
,
token:
"gk/HPpAJ+jTVNg/vu7Mt0WsUD+eakhN4KyZ3I5Ad58U+aowJCDEy0RwBVZqFVAMI"
};
var servicePath =
""
;
var blogURL =
""
;</script>
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=UTF-8"
>
<title>Insert title here</title>
<style type=
"text/css"
>.another_category {
border: 1px solid #E5E5E5;
padding: 10px 10px 5px;
margin: 10px
0
;
clear: both;
}
.another_category h4 {
font-size: 12px !important;
margin:
0
!important;
border-bottom: 1px solid #E5E5E5 !important;
padding: 2px
0
6px !important;
}
.another_category h4 a {
font-weight: bold !important;
}
.another_category table {
table-layout: fixed;
border-collapse: collapse;
width:
100
% !important;
margin-top: 10px !important;
}
* html .another_category table {
width: auto !important;
}
*:first-child + html .another_category table {
width: auto !important;
}
.another_category th, .another_category td {
padding:
0
0
4px !important;
}
.another_category th {
text-align: left;
font-size: 12px !important;
font-weight: normal;
word-
break
:
break
-all;
overflow: hidden;
line-height:
1.5
;
}
.another_category td {
text-align: right;
width: 80px;
font-size: 11px;
}
.another_category th a {
font-weight: normal;
text-decoration: none;
border: none !important;
}
.another_category th a.current {
font-weight: bold;
text-decoration: none !important;
border-bottom: 1px solid !important;
}
.another_category th span {
font-weight: normal;
text-decoration: none;
font: 10px Tahoma, Sans-serif;
border: none !important;
}
.another_category_color_gray, .another_category_color_gray h4 {
border-color: #E5E5E5 !important;
}
.another_category_color_gray * {
color: #
909090
!important;
}
.another_category_color_gray th a.current {
border-color: #
909090
!important;
}
.another_category_color_gray h4, .another_category_color_gray h4 a {
color: #
737373
!important;
}
.another_category_color_red, .another_category_color_red h4 {
border-color: #F6D4D3 !important;
}
.another_category_color_red * {
color: #E86869 !important;
}
.another_category_color_red th a.current {
border-color: #E86869 !important;
}
.another_category_color_red h4, .another_category_color_red h4 a {
color: #ED0908 !important;
}
.another_category_color_green, .another_category_color_green h4 {
border-color: #CCE7C8 !important;
}
.another_category_color_green * {
color: #64C05B !important;
}
.another_category_color_green th a.current {
border-color: #64C05B !important;
}
.another_category_color_green h4, .another_category_color_green h4 a {
color: #3EA731 !important;
}
.another_category_color_blue, .another_category_color_blue h4 {
border-color: #C8DAF2 !important;
}
.another_category_color_blue * {
color: #477FD6 !important;
}
.another_category_color_blue th a.current {
border-color: #477FD6 !important;
}
.another_category_color_blue h4, .another_category_color_blue h4 a {
color: #1960CA !important;
}
.another_category_color_violet, .another_category_color_violet h4 {
border-color: #E1CEEC !important;
}
.another_category_color_violet * {
color: #9D64C5 !important;
}
.another_category_color_violet th a.current {
border-color: #9D64C5 !important;
}
.another_category_color_violet h4, .another_category_color_violet h4 a {
color: #7E2CB5 !important;
}
</style>
<!-- BEGIN STRUCTURED_DATA -->
<script type=
"application/ld+json"
>
{
"@context"
:
"http://schema.org"
,
"@type"
:
"BreadcrumbList"
,
"itemListElement"
:[{
"@type"
:
"ListItem"
,
"position"
:
0
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/83"
,
"name"
:
"JSP MVC패턴을 이용한 게시판 만들기 1(개요)"
}},{
"@type"
:
"ListItem"
,
"position"
:
1
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/80"
,
"name"
:
"JSP FrontController 패턴, Command 패턴, RequestDispatcher를 이용한 forward에 대하여..."
}},{
"@type"
:
"ListItem"
,
"position"
:
2
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/79"
,
"name"
:
"JSP JSTL(Java Standard Tag Liarary)"
}},{
"@type"
:
"ListItem"
,
"position"
:
3
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/78"
,
"name"
:
"JSP EL(Expression Language) 표현언어"
}},{
"@type"
:
"ListItem"
,
"position"
:
4
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/77"
,
"name"
:
"JSP 파일업로드"
}},{
"@type"
:
"ListItem"
,
"position"
:
5
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/76"
,
"name"
:
"JSP 커넥션 풀(Connection Pool)"
}},{
"@type"
:
"ListItem"
,
"position"
:
6
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/73"
,
"name"
:
"JSP DB(데이터베이스)"
}},{
"@type"
:
"ListItem"
,
"position"
:
7
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/72"
,
"name"
:
"JSP 자바 빈즈(JAVA BEANS)"
}},{
"@type"
:
"ListItem"
,
"position"
:
8
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/70"
,
"name"
:
"JSP 에러페이지에 대하여..."
}},{
"@type"
:
"ListItem"
,
"position"
:
9
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/69"
,
"name"
:
"JSP 쿠키(cookie)에 대하여..."
}},{
"@type"
:
"ListItem"
,
"position"
:
10
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/68"
,
"name"
:
"JSP에서의 세션(session)에 대해서..."
}},{
"@type"
:
"ListItem"
,
"position"
:
11
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/66"
,
"name"
:
"JSP 액션 태그(forward,include,param)"
}},{
"@type"
:
"ListItem"
,
"position"
:
12
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/64"
,
"name"
:
"JSP request,response 내장 객체"
}},{
"@type"
:
"ListItem"
,
"position"
:
13
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/63"
,
"name"
:
"JSP 지시자(directive) : page지시자,include지시자,taglib 지시자"
}},{
"@type"
:
"ListItem"
,
"position"
:
14
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/62"
,
"name"
:
"JSP 스크립트 요소(스크립트릿,선언식,표현식)"
}},{
"@type"
:
"ListItem"
,
"position"
:
15
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/60"
,
"name"
:
"[ servlet 초기화 파라미터, 컨텍스트 파라미터, 서블릿 컨텍스트 리스너]"
}},{
"@type"
:
"ListItem"
,
"position"
:
16
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/58"
,
"name"
:
"5. Servlet에서의 HTML Form태그, servlet Parameter, 한글처리"
}},{
"@type"
:
"ListItem"
,
"position"
:
17
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/56"
,
"name"
:
"4. servlet의 라이프사이클(lifecycle)"
}},{
"@type"
:
"ListItem"
,
"position"
:
18
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/55"
,
"name"
:
"3. servlet의 doGet(), doPost()와 PrintWriter 객체"
}},{
"@type"
:
"ListItem"
,
"position"
:
19
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/53"
,
"name"
:
"2. [ Servlet Mapping에 관하여... ]"
}},{
"@type"
:
"ListItem"
,
"position"
:
20
,
"item"
:{
"@id"
:
"https://rongscodinghistory.tistory.com/52"
,
"name"
:
"1. [ JSP 웹 기본 지식 및 작동 원리 ]"
}}]}
</script>
<!-- END STRUCTURED_DATA -->
<link rel=
"stylesheet"
type=
"text/css"
href=
"//t1.daumcdn.net/tistory_admin/www/style/top/font.css"
/>
</head>
<body>
<!--
[ session ]
: 사용자 정보를 저장한다. 서버에 저장한다. 용량 제한이 거의 없다. 세션보다 보안에 좋다.(쿠키는 클라이언트에 저장되어 서버요청시 네트워크를 통해
이동하기 때문에 중간에 와이어샤크 등으로 가져갈 수 있기 때매 보안에 안좋음...)
웹브라우저가 기본 단위이다. 따라서 브라우저마다 세션이 생성된다.
브라우저 종료시 소멸된다.
브라우저 종료시에도 특정 정보를 계속 유지하려면 캐쉬를 사용하자.
-->
<%
HttpSession mySession = request.getSession();
session.setAttribute(
"age"
,
28
);
session.setAttribute(
"name"
,
"hyr"
);
Object age = session.getAttribute(
"age"
);
int
ageVal = Integer.parseInt(age.toString());
String name = (String)session.getAttribute(
"name"
);
Enumeration e = session.getAttributeNames();
while
(e.hasMoreElements()){
String key = (String)e.nextElement();
Object sessionVal = session.getAttribute(key);
}
String sessionId = session.getId();
session.setMaxInactiveInterval(
60
*
60
);
session.removeAttribute(
"age"
);
session.invalidate();
%>
<div style=
"margin:0; padding:0; border:none; background:none; float:none; clear:none; z-index:0"
></div>
<script type=
"text/javascript"
>window.roosevelt_params_queue = window.roosevelt_params_queue || [{channel_id:
'dk'
, channel_label:
'{tistory}'
}]</script>
<script type=
"text/javascript"
src=
"//t1.daumcdn.net/midas/rt/dk_bt/roosevelt_dk_bt.js"
async=
"async"
></script>
<script>window.tiara = {
"svcDomain"
:
"user.tistory.com"
,
"section"
:
"기타"
,
"trackPage"
:
"글뷰_보기"
,
"page"
:
"글뷰"
,
"key"
:
"2750468"
,
"customProps"
:{
"userId"
:
"0"
,
"blogId"
:
"2750468"
,
"entryId"
:
"null"
,
"role"
:
"guest"
,
"trackPage"
:
"글뷰_보기"
,
"filterTarget"
:
false
},
"entry"
:
null
,
"kakaoAppKey"
:
"3e6ddd834b023f24221217e370daed18"
,
"appUserId"
:
"null"
}</script>
</body>
</html>