大家帮我找找错误?
<%@ 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
----------------解决方案--------------------------------------------------------
可能由于非法字符引起错误!
----------------解决方案--------------------------------------------------------
userBean.getUserID()
userBean.getPassword()把这两个取出来看,到底是什么~~
----------------解决方案--------------------------------------------------------
可能用了全角符号
----------------解决方案--------------------------------------------------------