问题是这样的,我分好页后,只要点击那些上一页,下一页,尾页,首页这些超过3次,第四次就不行了,在那里加载中...只能重启Tomcat才行,然后点3次又死了,
我把代码贴上来让大家看看,能帮忙的麻烦帮一下,谢谢。
Action的代码:
        int pageSize = 5;
public int currtPage;
private EmployeeService employeeService;

public int getCurrtPage() {
return currtPage;
}
public void setCurrtPage(int currtPage) {
this.currtPage = currtPage;
}
@Resource(name="employeeServiceImpl")
public void setEmployeeService(EmployeeService employeeService) {
this.employeeService = employeeService;
}

@Override
public String execute() throws Exception {
PageView pageView = new PageView(pageSize,currtPage);
QueryResult queryResult = employeeService.getScrollData(pageView.getFirstResult(), pageSize);

if(queryResult != null){
pageView.setQueryResult(queryResult);
}
ServletActionContext.getRequest().setAttribute("pageView", pageView);
return "success";
}PageView的代码:      
public class PageView<T> {
private List<T> records;
private PageIndex pageindex;
private long totalpage = 1;
private int maxresult = 5;
private int currentpage = 1;
private long totalrecord;
private int pagecode = 10;

public PageView(int maxresult, int currentpage) {
this.maxresult = maxresult;
this.currentpage = currentpage;
}


public int getFirstResult() {
return (this.currentpage-1)*this.maxresult;
} public void setQueryResult(QueryResult<T> qr){
setTotalrecord(qr.getTotalrecord());
setRecords(qr.getResultlist());
}

public long getTotalrecord() {
return totalrecord;
}

public void setTotalrecord(long totalrecord) {
this.totalrecord = totalrecord;
setTotalpage(this.totalrecord%this.maxresult==0? this.totalrecord/this.maxresult : this.totalrecord/this.maxresult+1);
}
public void setTotalpage(long totalpage) {
this.totalpage = totalpage;
this.pageindex = PageIndex.getPageIndex(pagecode, currentpage, totalpage);
}

public long getLastPage(){
long lastPage = currentpage - 1;
if(lastPage < 1){
lastPage = 1;
return lastPage;
}
return lastPage;
}
public long getNextPage(){
long nextPage = currentpage + 1;
if(nextPage > totalpage){
nextPage = totalpage;
return nextPage;
}
return nextPage;
}


public List<T> getRecords() {
return records;
}
public void setRecords(List<T> records) {
this.records = records;
}
public PageIndex getPageindex() {
return pageindex;
}
public long getTotalpage() {
return totalpage;
}

public int getMaxresult() {
return maxresult;
}
public int getCurrentpage() {
return currentpage;
}
public int getPagecode() {
return pagecode;
}
public void setPagecode(int pagecode) {
this.pagecode = pagecode;
}
}QueryResult的代码:
      public class QueryResult<T> {

private List<T> resultlist;

private long totalrecord; public List<T> getResultlist() {
return resultlist;
}
public void setResultlist(List<T> resultlist) {
this.resultlist = resultlist;
}
public long getTotalrecord() {
return totalrecord;
}
public void setTotalrecord(long totalrecord) {
this.totalrecord = totalrecord;
}}
页面的jsp代码:
     <font color="black" size="2">共[<%=((PageView)request.getAttribute("pageView")).getTotalpage() %>]页</font>&nbsp;&nbsp;
<font size="2" color="black">当前第[<%=((PageView)request.getAttribute("pageView")).getCurrentpage() %>]页</font>&nbsp;&nbsp;
<a href='EmployeeListAction?currtPage=1'><font size="2" color="#103864">首页</font>
</a>
<a href='EmployeeListAction?currtPage=<%=((PageView)request.getAttribute("pageView")).getLastPage() %>'><font size="2" color="#103864">上一页</font>
</a>
<a href='EmployeeListAction?currtPage=<%=((PageView)request.getAttribute("pageView")).getNextPage() %>'><font size="2" color="#103864">下一页</font>
</a>
<a href='EmployeeListAction?currtPage=<%=((PageView)request.getAttribute("pageView")).getTotalpage() %>'><font size="2" color="#103864">尾页</font>就这么多,请问一下什么原因啊?真是奇怪了。