日期:2014-05-18  浏览次数:20938 次

如何用javabean实现jsp的分页功能!!!!!!!!!急用!!!!!!
如何用javabean实现jsp的分页功能

------解决方案--------------------
油箱给我
------解决方案--------------------
我给提供以下所示的样例:
int i,j=1,pagecount,nowpageint;
pagecount = Integer.valueOf(request.getParameter( "pagecount ")).intValue();
String strCurrentPage = request.getParameter( "pageNumble ");
String nowpagestr = request.getParameter( "nowpage ");
nowpageint = Integer.valueOf(nowpagestr).intValue();
String doctype = getStr(request.getParameter( "doctype "));
String volume = request.getParameter( "volume ");
String pagenumble,path;
if(pagecount > 10 && pagecount < 100)
if(nowpageint <10) pagenumble = "0 "+nowpagestr;
else pagenumble = nowpagestr;
else
if(nowpageint <10) pagenumble = "00 "+nowpagestr;
else if (nowpageint > =10 &&nowpageint <100) pagenumble = "0 "+nowpagestr;
else pagenumble = nowpagestr;

path=getStr(request.getContextPath()+ "/../webapp/Server/eDoc/ "+doctype+ "/ "+volume+ "/ "+pagenumble+ ".jpg ");
System.out.println(path);
%>
当然了,你把要传的参数保存到javabean中,此例子仅供参考.