- <P>javabean的部分代码sbglUtil 类的部分代码
- public Collection getAllsbgl() throws Exception {
- Statement stmt = con.createStatement();
- ResultSet rst = stmt.executeQuery("select * from sbtj");
- Collection ret = new ArrayList();
- while (rst.next()) {
- sbgl tempSt = new sbgl();
- tempSt.setid(rst.getString("id"));
- tempSt.setname(rst.getString("name"));
- tempSt.setrkdate(rst.getString("rkdate"));
- tempSt.setsbxh(rst.getString("sbxh"));
- tempSt.setscdate(rst.getString("scdate"));
- tempSt.setsblx(rst.getString("sblx"));
- tempSt.setgs(rst.getString("gs"));
- tempSt.setbm(rst.getString("bm"));
- tempSt.setsbzt(rst.getString("sbzt"));
- tempSt.setczid(rst.getString("czid"));
- ret.add(tempSt);
- }
- stmt.close();
- con.close();
- return ret;
- }
- -----------------------
- sbgl 类中的部分代码
- }
- public String getbm() {
- return bm;
- }
- public String getsbzt() {
- return sbzt;
- }
- public String getczid() {
- return czid;
- }
- public void setscdate(String scdate) {
- this.scdate = scdate;
- }
- public void setname(String name) {
- this.name = name;
- }
- public void setrkdate(String rkdate) {
- this.rkdate = rkdate;
- }
- public void setsbxh(String sbxh) {
- ----------------------------------------------------------------------------
- jsp部分代码
- Collection sbgls=sbglUtil.getAllsbgl();
- Iterator it=sbgls.iterator();
- while(it.hasNext())
- {
- sbgl temp=(sbgl)it.next();
- out.println("<tr>");
- </P>
- <P>
- </P>
复制代码 jsp报以下的错,搜索了还是解决不了。请大神指点
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 31 in the jsp file: /viewStudent.jsp
sbgl cannot be resolved to a type
28: Iterator it=sbgls.iterator();
29: while(it.hasNext())
30: {
31: sbgl temp=(sbgl)it.next();
32: out.println("<tr>");
|