index.jsp

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>新闻管理登陆</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<title>登录首页</title>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/cs.css">

<script type="text/javascript" src="<%=basePath%>js/login.js"></script>
</head>

<body>
<h1 align="center">新闻发布系统</h1>
<form action="LoginServ" name="t" method="post">
<table border="1" align="center">
<tr>
<td>
<H1>用户登录</H1>
</td>
</tr>
<tr>
<td>用户帐号</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td>用户密码</td>
<td><input type="password" name="password"></td>
</tr>

<tr>
<td colspan="4" align="center">
<input type="submit" value="提 交" onclick="account(t)">
<input type="reset" value="重 置" onclick="xj()">
<input type="button" value="注 册" onclick="openURL('<%=basePath%>register/Register.jsp')"></td>
</tr>
<tr>
<td colspan="3">
<%String s=( String)request.getAttribute("data");
if(s!=null){
out.print(s);
}
%>
</td>
</tr>
</table>
</form>
</body>
</html>

原文地址:https://www.cnblogs.com/Anei/p/7758120.html