67,514
社区成员
发帖
与我相关
我的任务
分享
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!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">
<link rel="stylesheet" href="../css/Login.css" />
<title>登录</title>
</head>
<body>
<center>
<%@include file="top.jsp"%>
<form action="../LoginServlet" method="post">
<table align="center">
<tr>
<td>
<img src="../images/logo.png" width=50px; height=60px;>
</td>
<td>
<h2>用户登录</h2>
</td>
</tr>
<tr>
<td>用户名:</td>
<td><input type="text" name="phone"></td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td>
<a href="#">忘记密码?</a>
</td>
<td>
<a href="Register.jsp">还没有账号?</a>
</td>
</tr>
<tr>
<td>
<input type="submit" value="登录">
</td>
</tr>
</table>
</form>
</center>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=utf-8"
pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import="java.text.SimpleDateFormat,java.util.Date"%>
<!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">
<link rel="stylesheet" href="../css/Personal.css" />
<title>top</title>
</head>
<body>
<center>
<div class="top1">
<box1>
<a href="index.jsp" float="left">做了么菜谱网</a>
<c>
${session.currUser.userName}
</c>
</box1>
<c:if test="${sessionScope.currUser == null}">
<box2>
您尚未登录,请
<a href="Login.jsp">登陆 </a>
或
<a href="Register.jsp"> 注册 </a>
</box2>
</c:if>
<c:if test="${sessionScope.currUser != null}">
<box2>
${sessionScope.currUser.userName}
</box2>
</c:if>
</div>
</center>
</body>
</html>