错误提示:org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 25 in the jsp file: /mmstest/mmsstatu.jsp
The method getresult() is undefined for the type MmsDao
22:  }
23: 
24:  MmsDao mms=new MmsDao(DataSourceFactory.getDataSource());
25:  List List=mms.getresult();
26:  %>
27:  <body bgcolor="#efefef">DAO代码:public class MmsDao {
public List getresult() { String sql = "select phone,sendTime,statu from plat_mms_history";

List tbl =  dbexec.queryForList(sql);
Iterator it = tbl.iterator();
ArrayList<HashMap<String, String>> List = new ArrayList<HashMap<String, String>>();
try {
while(it.hasNext()) {
Map rec = (Map)it.next();
HashMap<String, String> hashRec = new HashMap<String,String>();
hashRec.put("phone", (String)rec.get("phone"));
hashRec.put("sendTime", "" +(Timestamp)rec.get("sendTime"));
hashRec.put("statu", (String)rec.get("statu"));
List.add(hashRec);
}
} catch(Exception e) {
System.out.println("检索失败!" + e.getMessage());
return null;
}
return List;
}}
JSP页面代码:<%@ page contentType="text/html; charset=gbk"%>
<%@page import="smartmt.db.DataSourceFactory"%>
<%@page import="java.util.List"%>
<%@page import="smartmt.db.MmsDao"%><%@ page import="java.sql.*" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<html>
<head>
<title>.</title>
</head>
<%
Long userId = (Long) session.getAttribute("userId");
if (userId == null) {
%><script>top.window.location.href='../index.htm'</script>
<%
return;
}

MmsDao mms=new MmsDao(DataSourceFactory.getDataSource());
List List=mms.getresult();
%>
<body bgcolor="#efefef">



<form id="addrForm" method="get" >
<%
request.setAttribute("List", List);
%>
<display:table name="List" pagesize="20" id="dis">
<display:column property="phone" title="手机号码" />
<display:column property="sendTime" title="发送时间" />
<display:column property="statu" title="发送状态" />
</display:table>
</form>
</body>


</html>