<%@ 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>My JSP 'one.jsp' starting page</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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head> <body>
<%
request.setCharacterEncoding("utf-8");
String user=request.getParameter("u_name");
String pwd=request.getParameter("u_pswd");
%>
<%
if(user.equals("lucky") && pwd.equals("123456")){
out.print("你好,"+user+"!");
//登陆成功
request.getRequestDispatcher("two.jsp").forward(request, response);
}else{
response.sendRedirect("index.jsp"); }
%> </body></html>
<%@ 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>My JSP 'two.jsp' starting page</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">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
--> </head> <body>
你好,Lucky!<br>
</body>
</html>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>登录验证</title>
</head>
<body>
<form action="one.jsp" method="post" >
<table align="center">
<tr>
<td><img src="Snap1.jpg"><div style="position:absolute; left: 650px; top: 216px; width: 356px;">
<table align="right">
<tr>
<td align="right">用户名:&nbsp;</td>
<td height="27"><input type="text" name="u_name" size="20"/><br></td>
</tr>
<tr>
<td align="right">密码:&nbsp;</td>
<td height="27"><input type="password" name="u_pswd" size="20"/><br></td>
</tr> <tr>
<td>
<div style="position:absolute; left: 200px; top: 80px; width: 356px;">
<input type="image" src="login.gif" width="101" height="22" border="0" name="submit" value="提交" />
</div>
</td>
</tr> </table>
</div>
</td>
</tr>
</table>
</form>
</body>
</html>

最新文章

  1. [译]ZOOKEEPER RECIPES-Locks
  2. laravel记录
  3. 光流算法:Brox算法
  4. springMVC导出 CSV案例
  5. .Net平台下的B/S开发框架
  6. NO.14 两个div并排,左边为绝对宽度,右边为相对宽度
  7. win10 系统下获取系统版本号为6.2的问题(manifest如何写)
  8. C语言学习第六章
  9. angular验证表单
  10. Kafka基础
  11. Java虚拟机一 运行时数据区(栈、堆、方法区等)
  12. InfluxDB安装和简介
  13. java 打包 war包
  14. 以ActiveMQ为例JAVA消息中间件学习【3】——SpringBoot中使用ActiveMQ
  15. SVN创建分支主干策略
  16. oozie 运行demo
  17. qt——QT中QWidget、QDialog及QMainWindow的区别
  18. php调试利器Xhprof的安装与使用
  19. flask-login 学习(1)
  20. 64_g5

热门文章

  1. composer disgnoize public key fail
  2. Docker学习笔记-01 初步了解
  3. Fortran处理无符号整型unsigned integer
  4. C# snaps
  5. 解决uniapp 使用自带 switch 双向绑定视图不更新的问题
  6. Django 知识点总结
  7. git从某个分支的指定历史版本中创建新分支
  8. Vue路由跳转时定位到页面顶部
  9. CentOS系统 / 目录下每个子目录的作用
  10. ThinkPHP3.2设置异常页面404跳转