阿
阿bao
Unregistered / Unconfirmed
GUEST, unregistred user!
<%@ page contentType="text/html;
charset=gb2312"
language="java"
import="java.sql.*,java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>登陆验证页面</title>
<jsp:useBean id="db"
class="opendb.opendb"/>
<%
String getAadno=new String(request.getParameter(TXT_ADNO));
String getAadpw=new String(request.getParameter(TXT_ADPW));
String sql="select adno,adpw from adtable where adno='"+getAadno+"' and adpw='"+getAadpw+"'";
ResultSet rs=db.executeQuery(sql);
if(rs.next())
{
system.out.println("登陆成功"
}
else
{
system.out.println("对不起,您的输入有误,请重新输入"
}
%>
</head>
<body>
</body>
</html>
调试后出现
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 8 in the jsp file: /website/BgSys/admin_login1.jsp
Generated servlet error:
[javac] Compiling 1 source file
D:/tomcat/work/Standalone/localhost/_/website/BgSys/admin_login1_jsp.java:72: ';' expected
}
^
An error occurred at line: 8 in the jsp file: /website/BgSys/admin_login1.jsp
Generated servlet error:
D:/tomcat/work/Standalone/localhost/_/website/BgSys/admin_login1_jsp.java:76: ';' expected
}
^
2 errors
charset=gb2312"
language="java"
import="java.sql.*,java.util.*"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>登陆验证页面</title>
<jsp:useBean id="db"
class="opendb.opendb"/>
<%
String getAadno=new String(request.getParameter(TXT_ADNO));
String getAadpw=new String(request.getParameter(TXT_ADPW));
String sql="select adno,adpw from adtable where adno='"+getAadno+"' and adpw='"+getAadpw+"'";
ResultSet rs=db.executeQuery(sql);
if(rs.next())
{
system.out.println("登陆成功"
}
else
{
system.out.println("对不起,您的输入有误,请重新输入"
}
%>
</head>
<body>
</body>
</html>
调试后出现
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: 8 in the jsp file: /website/BgSys/admin_login1.jsp
Generated servlet error:
[javac] Compiling 1 source file
D:/tomcat/work/Standalone/localhost/_/website/BgSys/admin_login1_jsp.java:72: ';' expected
}
^
An error occurred at line: 8 in the jsp file: /website/BgSys/admin_login1.jsp
Generated servlet error:
D:/tomcat/work/Standalone/localhost/_/website/BgSys/admin_login1_jsp.java:76: ';' expected
}
^
2 errors