반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- #C언어#숫자비교#삼항연산자
- #alert#자바스크립트#checkbox#alert
- #C언어#switch#case#계산기#함수
- #jQuery#mouse#over
- #자바스크립트#텍스트#알람#alert
- #자바스크립트#접속시간#시간
- #alert#자바스크립트#radio#check
- #html#프레임
- #getElementById#id
- #C언어#if
- #db#join#inner#cross
- #C언어#do#while#계산기
- #증감#연산자
- #C언어#사각형
- #select#from#distinct
- #html#테이블#table
- #db#where
- #자바스크립트#시계#실시간시계
- #자바스크립트#만년달력#달력
- #db#데이터베이스#select
- #C언어#scanf#fflush
- #C언어#for#간단#예제
- #자바스크립트#alert
- #클릭#숨기기#보이기
- #C언어#타입#printf
- #db#order#by
- #C언어#성적처리#점수#등급
- #자바스크립트#회원가입#유효성#검사
- #C언어#do#while#계산기#함수
- #db#froup#by
Archives
- Today
- Total
선택장애
JSP - Sesstion(alert) 본문
반응형
<%@ page language="java" contentType="text/html; charset=EUC-KR"
pageEncoding="EUC-KR"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<center>
<H1>SESSION 예제</H1>
<hr>
<%
// is New() 메서드를 이용해 최초 세션 설정을 확인하고 있다.
if(session.isNew())
{
out.println("<script> alert('세션이 헤재되어 다시 설정합니다.') </script>");
session.setAttribute("login", "홍길동");
}
//session이 살아 있기 때문에 새로고침해도 알림창이 안 뜬다. 완전히 껏다켜야한다.
%>
# <%= session.getAttribute("login") %> 님 환영합니다.!!! <br>
1. 세션 ID : <%= session.getId() %><br>
2. 세션 유지시간 : <%= session.getMaxInactiveInterval()
%><Br>
</center>
</body>
</html>
반응형
'JSP' 카테고리의 다른 글
JSP - 장바구니(물건추가, 로그아웃)Session (0) | 2017.08.14 |
---|---|
JSP - Application(name이름넘기기, count값 올리기) (0) | 2017.08.14 |
JSP - request사용하기 (select와 checkbox값받기) (0) | 2017.08.14 |
JSP - Forward_Action, response.sendRedirect (0) | 2017.08.14 |