//get,set方法
public List getSearchSongReult() {
return searchSongResult;
}
public void setSearchSongReult(List<Song> searchSongReult) {
this.searchSongResult = searchSongReult;
}
//從數據庫裡檢索出來歌名
public String search(){
try {
searchSongResult = songManageService.getSongByName(this.songname);
return "success";
} catch (Exception e) {
return"fail";
}
我想把檢索出來的searchSongResult返回到jsp頁面上,問了一下別人好像是用foreach?網上看了半天沒看懂,能不能稍微詳細點講一下代碼怎麼寫。
完整的例子
http://459104018-qq-com.iteye.com/blog/467196