2017년 10월 15일 일요일

[JSTL] Duplicate Log In Check with JSTL

<c:if test = '${empty sessionScope.loginId}">
<form action = "${myContextPath}/member" method = "post">
ID:<input type="text name="id" size="20"><br>
PW:<input type="password" name="pw" size="20"><br>
<input type="submit" value="Sign up">
<input type="hidden" name="task" value="login">
</form>
</c:if>
<c:if test = '${not empty sessionScope.loginId}">
<script type = "text/javascript">
alert("This account is already logged in.");
</script>
<%
response.sendRedirect(request.getContextPath()+"/");
%>

댓글 없음:

댓글 쓰기