当前位置: 代码迷 >> Web开发 >> Cannot make a static reference to the non-static field 是什么东东
  详细解决方案

Cannot make a static reference to the non-static field 是什么东东

热度:1284   发布时间:2012-02-26 20:19:44.0
Cannot make a static reference to the non-static field 是什么错误?
2个文件:search_result.jsp和pageman.jsp都位于同一文件夹下;


我在search_result.jsp中调用pageman.jsp:<%@ include file="pageman.jsp" %>

An error occurred at line: 22 ,23,24,25 in the jsp file: /back_manage/pageman.jsp
Cannot make a static reference to the non-static field PageBean.rowsPerPage
19: -->
20: </script>  
21: <body>
22: 每页<%=PageBean.rowsPerPage%>行
23: | 共<%=PageBean.maxRowCount %>行
24: | 第<%=PageBean.curPage %>页
25: | 共<%=PageBean.maxPage%>页 

这是什么错误,怎么解决啊?

------解决方案--------------------
rowsPerPage是static类型的变量吗?否则是不行的
  相关解决方案