Notice
Recent Posts
Recent Comments
Link
«   2024/11   »
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
Archives
Today
Total
관리 메뉴

까먹지 말자! 자주 보자!

JSP BOARDER(5)_(boardAdmin_AdminLogin.jsp) 본문

JSP

JSP BOARDER(5)_(boardAdmin_AdminLogin.jsp)

Phonetographer 2016. 5. 24. 17:14

<%@ page language="java" contentType="text/html; charset=UTF-8"

    pageEncoding="UTF-8"%>

<%@ page import = "java.util.*, board.*" %>

<!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=UTF-8">

<title>Admin Page</title>

</head>

<body>

<%

AdminManager adminManager = AdminManager.getInstance();

if(session.getAttribute("id") != null && adminManager.isAdmin((String)session.getAttribute("id"))){

%>

<h2>관리자로 로그인 되어있습니다.</h2>

<a href = "logout.jsp">로그아웃</a>

<%

}else {

String adminID = request.getParameter("adminid");

String adminPass = request.getParameter("adminpass");

if(adminManager.chkAdmin(adminID, adminPass)){

session.setAttribute("id", adminID);

response.sendRedirect("boardAdmin_AdminLogin.jsp");

}else {

%>

<form action = "boardAdmin_AdminLogin.jsp" method = "post">

ID : <input type = "text" name = "adminid"/><br>

PASS : <input type = "password" name = "adminpass" /> <br>

<input type ="submit" value="로그인"/>

</form>

<%

}

}

%>

</body>

</html>

'JSP' 카테고리의 다른 글

JSP BOARDER(7)_(logout.jsp)  (0) 2016.05.24
JSP BOARDER(6)_(boardAdmin_CreateBoard.jsp)  (0) 2016.05.24
JSP BOARDER(4)_(ConnectionPool .java)  (0) 2016.05.24
JSP BOARDER(3)_(ConnectionFactory .java)  (0) 2016.05.24
JSP BOARDER(2)_(BoardData .java)  (0) 2016.05.24