标题:大家帮我找找错误?
取消只看楼主
jimmy1982
Rank: 1
等 级:新手上路
帖 子:28
专家分:0
注 册:2007-1-16
 问题点数:0 回复次数:0 
大家帮我找找错误?
<%@ page contentType="text/html; charset=GBk" errorPage="error.jsp" %>
<%@ page import="java.sql.*"%>
<%@ page import="loginpro.DSbean"%>
<html>
<head>
<title>
execute
</title>
</head>
<jsp:useBean id="userBean" scope="session" class="loginpro.userBean" />
<jsp:setProperty name="userBean" property="*" />
<body bgcolor="#ffffff">
<%
Connection conn = loginpro.DSbean.getConn(); 
String sqlStr = "select count(*) from test where userName = ? and password =? ";
PreparedStatement pStat = conn.prepareStatement(sqlStr);  
pStat.setString(1,userBean.getUserID());   
pStat.setString(2,userBean.getPassword());  
ResultSet rs = pStat.executeQuery();  
if(rs.next() && rs.getInt(1) == 1)
{  
out.print("您是合法的用户,欢迎您的到来!");
}
else
{
out.print("密码不对,或者您还没有注册为系统的用户");
}
%>
<h1>
JBuilder Generated JSP
</h1>
</body>
</html>

出错的信息:
illegal character: \12288
illegal character: \12288
illegal character: \12288
illegal character: \12288
illegal character: \12288
illegal character: \12288
illegal character: \12288
illegal character: \12288
搜索更多相关主题的帖子: userBean loginpro import jsp 
2007-02-06 21:44



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-119960-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.487381 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved