JSP登陆
来源:互联网 发布:初学颜体 知乎 编辑:程序博客网 时间:2024/05/16 09:18
login.jsp
<%@ page language="java" contentType="text/html; charset=GB2312" pageEncoding="GB2312"%><%@ page import="java.util.*" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <title>登录页面</title></head><body> <form name="loginForm" method="post" action="judgeUser.jsp"> <table> <tr> <td>用户名:<input type="text" name="userName" id="userName"></td> </tr> <tr> <td>密码:<input type="password" name="password" id="password"></td> </tr> <tr> <td><input type="submit" value="登录" style="background-color:pink"> <input type="reset" value="重置" style="background-color:red"></td> </tr> </table> </form></body></html>
judgeUser.jsp
<%@ page language="java" contentType="text/html; charset=GB2312" pageEncoding="GB2312"%><%@ page import="java.util.*" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <title>身份验证</title></head><body> <% request.setCharacterEncoding("GB2312"); String name = request.getParameter("userName"); String password = request.getParameter("password"); if(name.equals("abc")&& password.equals("123")) { %> <jsp:forward page="afterLogin.jsp"> <jsp:param name="userName" value="<%=name%>"/> </jsp:forward> <% } else { %> <jsp:forward page="login.jsp"/> <% } %></body></html>
after.jsp
<%@ page language="java" contentType="text/html; charset=GB2312" pageEncoding="GB2312"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head> <title>登录成功</title></head><body> <% request.setCharacterEncoding("GB2312"); String name = request.getParameter("userName"); out.println("欢迎你:" + name); %></body></html>
- JSP登陆
- JSP登陆页 login.jsp
- JSP 唯一登陆判断
- 登陆过滤器 (JSP)
- 登陆过滤器 (JSP)
- jsp登陆模块
- JSP常用登陆代码
- jsp登陆访问跳转
- jsp 登陆验证码
- JSP登陆的实现
- JSP Struts2 登陆
- jsp登陆系统
- HTML jsp 登陆界面
- jsp+servlet实现登陆
- JSP(8):登陆用户
- Jsp登陆界面
- JSP登陆界面
- javascript jsp登陆界面
- linux使用读写锁
- 第二次C语言设计上机报告
- android播放rtsp文件
- DDInstall Section in a Network INF File (Windows Drivers)
- 安装了cygwin选择最快的网址
- JSP登陆
- iPhone: Duplicate Symbol Error?
- oracle中 count(1) 是什么意思
- ARC , event,UIScrillView
- windows下32位汇编语言学习笔记
- 大学是用来做什么的
- linux驱动模型中的 DEVICE_ATTR 宏分析
- linux学习入门15——网络原理(linuxcast.net)(网络编址,IP,ARP,DNS,域名)
- 解决linux/config.h: No such file or directory