關於Struts
Struts
public List //獲取分頁數據 public int getCount() { //我用的sqlserver ================================ public class Test(){ ================================ ================================ private int pageNow = //省略seter public String execute() throws Exception { OK了
List list = * ;
//我用的sqlserver
String sql =
where username like
(select top
order by id
return list;
}
String sql =
//得到總數據條數
int count = *;
return count;
}
Test類(封裝數據)
private int id;
private String username;
private password;
//省略seter
}
showNO 姓名 密碼
[page:
ShowAction
private int pageSize =
private int count; //總頁數
private List
count = (dao
testList = dao
if (testList == null)
testList = new ArrayList();
return SUCCESS;
}
From:http://tw.wingwit.com/Article/program/Java/ky/201311/27889.html