Home > Back-end >  SP file://showAllStudent. JSP is a mistake in the first line [23] StudentDB always be resolved to a
SP file://showAllStudent. JSP is a mistake in the first line [23] StudentDB always be resolved to a

Time:09-20

The above mistakes don't know why where
All code is
The code red line is wrong, have who can help?
& lt; % @ page language="Java" contentType="text/HTML. Charset=gb2312 "
PageEncoding="gb2312" import="Java. SQL. *" % & gt;
& lt; % @ page import="org. JDBC. *" % & gt;
& lt; % @ page import="org. Vo. *" % & gt;
& lt; % @ page import="Java. Util. *" % & gt;
& lt; Html>
& lt; head>
& lt; Meta HTTP - equiv="content-type" Content="text/HTML. Charset=gb2312 "& gt;
& lt; Title> Show All Students
& lt;/head>
& lt; Body>
& lt; H1 & gt; Student information sheet & lt; BR> & lt;/h1 & gt;
& lt; The table border="1" & gt;
& lt; Tr>
& lt; Td> Student id & lt;/td>
& lt; Td> Name & lt;/td>
& lt; Td> Professional & lt;/td>
& lt; Td> Total credit & lt;/td>
& lt;/tr>

& lt; %
StudentDB stuDB=new StudentDB ();
List. Students=stuDB getAllStudent ();
Iterator it=students. The Iterator ();
While (it. HasNext ())
{
Student stu=(Student) it. Next ();
%>
& lt; Tr>
& lt; Td> & lt; %=stu. GetXh () % & gt; & lt;/td>
& lt; Td> & lt; %=stu. GetXm () % & gt; & lt;/td>
& lt; Td> & lt; %=stu. GetZy () % & gt; & lt;/td>
& lt; Td> & lt; %=stu. GetZxf () % & gt; & lt;/td>
& lt;/tr>
& lt; %
}
%>
& lt;/table>
& lt; Input type="button" value="https://bbs.csdn.net/topics/returns" onClick="javaScript: history. The back ()" & gt;
& lt;/body>
& lt;/html>

CodePudding user response:

Import separately for each class as far as possible need not *
StudentDB didn't import
  • Related