ssh2 spring里没加 scope="prototype"
在调用list()方法时给countpage赋值了
我点下一页调用down()方法时,取countpage出错,值为null
为什么会取不到值呢
在调用list()方法时给countpage赋值了
我点下一页调用down()方法时,取countpage出错,值为null
为什么会取不到值呢
解决方案 »
- FCKEditor IE6 插入图片
- 大家都来说说java面试都有那些个方面,进来补全,好让新人早日工作啊!
- 求助。。。。
- 毕业设计打算做一个网购系统,如何完成在线电子支付,打算调用支付宝的接口,如何调用及步骤!
- hibernate many to many 的问题
- struts2 的表单处理问题..............
- jdbc连接oracle的问题
- struts.properties文件不能输入中文
- 新手求助:Server Tomcat v8.0 Server at localhost failed to start.
- 前后端分离的架构,如何保障api的安全?
- 我的SSH中,为什么老是说找不到文件啊???T.T求指教
- 在线等!org.hibernate.TransientObjectException: object references an unsaved transie
那就不是单例多例的问题了,你看看你传递前参数是否已经为null了。
{
lrefuse=zsuperefuseDao.getList("",pageCount,1);
Integer just =zsuperefuseDao.getpagecount("");// setPageCount();
if(just%pageCount==0&&just!=0){
countPage =just/pageCount;
count = just;
pageIndex =1;
}else if(just!=0){
countPage = just/pageCount+1;
count = just;
pageIndex =1;
}else{
countPage = 0;
count = 0;
pageIndex = 0;
}
return "list";
}public String down()
{
try{
pageIndex =Integer.parseInt(getParameter("curpage"));
if(pageIndex<countPage)
{
pageIndex++;
Integer first = (pageIndex-1)*pageCount+1;
Integer end = pageIndex*pageCount;
if(end>=count){
end=count;
}
lrefuse=zsuperefuseDao.getList("",first,end);
}
return "list";
}
catch(Exception e){
return "err";
}
}list()方法里还能取到countpage的值
我用这样取了,Integer just =zsuperefuseDao.getpagecount("");