Eclipse是不是有时会乱提示的阿?
下面的代码我根据它提示的错误看不出我哪里错了。郁闷
哪位可以帮我在你们的上面试下阿?谢谢
<%@ page contentType= "text/html;charset=GB2312 "%>
<%@ page import= "java.sql.* "%>
<%
String Lesson = request.getParameter( "Lesson ");
String No = request.getParameter( "No ");
String Name = request.getParameter( "Name ");
String SQL = "Select * Form " + Lesson + "Order By 题号 ";
Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try {
Class.forName( "sun.jdbc.odbc.JdbcDriver ");
} catch (
ClassNotFoundException ce) {
out.println(ce.getMessage());
}
try {
conn = DriverManager.getConnection( "jdbc:odbc:test ");
stmt = conn.createStatement();
rs = stmt.executeQuery(SQL);
} catch (
SQLException e) {
System.out.println(e.getMessage());
}
%>
<BODY BGCOLOR= "BEIGE ">
<CENTER>
<H1>
<FONT COLOR= "red "> 在线考试系统 </FONT>
</H1>
</CENTER>
<H2>
考试科目--
<%=Lesson%>
<HR>
</H2>
<FORM Action= "score.jsp " Method= "GET ">
<INPUT TYPE= "hidden " NAME= "Lesson " VALUE= " <%=Lesson%> ">
<INPUT TYPE= "hidden " NAME= "No " VALUE= " <%=No%> ">
<INPUT TYPE= "hidden " NAME= "Name " VALUE= " <%=Name%> ">
<%
String TestType = " ";
String leixing = " ";
String tihao = " ";
while (rs.next()) {
leixing = rs.getString( "类型 ");
tihao = rs.getString( "题号 ");
out.print( " <B> " + tihao + ". " + rs.getString( "题目 ") + leixing
+ ": " + rs.getString( "分数 ") + "分) </B> ");
out.print( " <div> ");
for (int i = 1; i < 5; i++) {
if (leixing.equals( "单选 ")) {
TestType = "Radio ";
} else {
TestType = "CheckBox ";
}
out.print( " <INPUT Type= " + TestType + " Name=No " + tihao
+ "Value= " + i + "> " + (rs.getString( "选项 " + i))
+ "BR> ");
}
out.print( " <div> ");
}
%>
<INPUT Type= "