<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% String id = null; String name = null; Cookie[] cookies = request.getCookies(); if(cookies !=null){ for(int i=0;i index

index


<%if(id == null) {%> 회원가입

로그인 <%} else { %> 로그아웃 <%} %> "> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% String id = null; String name = null; Cookie[] cookies = request.getCookies(); if(cookies !=null){ for(int i=0;i index

index


<%if(id == null) {%> 회원가입

로그인 <%} else { %> 로그아웃 <%} %> "> <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <% String id = null; String name = null; Cookie[] cookies = request.getCookies(); if(cookies !=null){ for(int i=0;i index

index


<%if(id == null) {%> 회원가입

로그인 <%} else { %> 로그아웃 <%} %> ">
<%@page import="java.net.URLDecoder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
String id = null;
String name = null;
Cookie[] cookies = request.getCookies();
if(cookies !=null){
	for(int i=0;i<cookies.length;i++){
		if(cookies[i].getName().equals("memberid")){
			id=cookies[i].getValue();
		} else if (cookies[i].getName().equals("membername")){
			name=URLDecoder.decode(cookies[i].getValue(), "utf-8");
		}
	}
}
%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
</head>
<body>
	<h1>index</h1>
	<br>
	<%if(id == null) {%>
		<a href="member/writeForm.jsp">회원가입</a>
		<br><br>
		<a href="member/loginForm.jsp">로그인</a>
	<%} else { %>
		<a href="member/logout.jsp">로그아웃</a>
	<%} %>
</body>
</html>