易截截图软件、单文件、免安装、纯绿色、仅160KB

jsp登录界面+access


1、用户登录界面log.jsp
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!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=gb2312">
<title>用户登陆</title>
</head>
<body>
<form method="post" action="Login.jsp">
<DIV align="center">
<P>用户名<input     type ="text" name="userName" value="" size="15" height="15"></P>
<P>密&nbsp;&nbsp;码<input type ="password" name="Password1" value="" size="15" height="15"></P>
<P><INPUT type=submit value=登陆 name=B1>&nbsp;&nbsp;<INPUT type=reset value=重填 name=B2>&nbsp;&nbsp;<INPUT onclick="window.open('newuser.jsp')" type=button value=注册 name=B3></P>
</DIV>
</form>
<form method="get" action="sh.jsp"><input type="submit" name="check" value="查询"></form>
</body>
</html>
2、处理用户登录的程序login.jsp
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@include file="ConnDB.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="robots" content="noindex,nofollow" />
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>登录检查</title>
</head>
<body>
<%
String userName = request.getParameter("userName");
String Password = request.getParameter("Password1");
Statement stmt_Check=conn.createStatement();
String sql = "select * from admin where userPwd='"+ Password + "' and userName='" + userName +"'";
ResultSet RsLoginCheck = stmt_Chec


相关文档:

JSP页面跳转的五种方法

1. RequestDispatcher.forward()
是在服务器端起作用,当使用forward()时,Servlet engine传递HTTP请求从当前的Servlet or JSP到另外一个Servlet,JSP 或普通HTML文件,也即你的form提交至a.jsp,在a.jsp用到了forward()重定向至b.jsp,此时form提交的所有信息在 b.jsp都可以获得,参数自动传递. 但forward()无法重定向至有frame ......

JSP/PHP运用详解

1,DateTime类型数字 
以下是引用片段: 
当前时间System.DateTime的=新System.DateTime的(); 
1.1小时分钟当前日期秒,当前时间= System.DateTime.Now; 
1.2检查本年度廉政年= currentTime.Year; 
1.3当前月份廉政个月= currentTime.Month; 
1,4采取当天廉政天= currentTime.Day;&n ......

MyEclipse的jsp页面问题


在我们装好MyEclipse时,有时双击打开jsp页面,
会提示错误,无法显示页面.
因此要将jsp的默认打开方式改成代码试图:
办法:在菜单栏的
1.window—->perferences—–>General——->editors——>file associations
2.选择jsp——->选择相应的editor 为def ......

Jsp生成静态页面

为了减轻服务器压力,将原来的文章管理系统由JSP文件的从数据库中取数据显示改为由jsp生成静态html文件后直接访问html文件。首先应创建一个模板文件,文件名和文件后缀可以随意,但我一般常用的还是 *.template ,因此,这里就以 template.template 为例( 将模板文件放入 /WEB-INF/templates/ 文件夹下 ):下面是一个简单的 ......

jsp登录验证代码


image.jsp用于生成数字图片
<%@ page contentType="image/jpeg;charset=gb2312" import="java.awt.*,
java.awt.image.*,java.util.*,javax.imageio.*" %>
<%!
Color getRandColor(int fc,int bc){//给定范围获得随机颜色
          Random random = new Rand ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号