<%@ page language="java" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %><%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>产品分类列表</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<pg:pager url="back/sysProducttype.do?method=showProducttype" index="half-full" maxPageItems = "10"
maxIndexPages="10" isOffset = "${false}" export = "currentPageNumber=pageNumber" scope = "request">
<table>
<c:forEach items="${producttype}" var="producttype">
<pg:item>
<tr>
<td height="39">${producttype.id}</td>
<td height="39">${producttype.name}</td>
</tr>
</pg:item>
</c:forEach>
</table>
<pg:index>
<pg:first unless="current"><a href="${pageUrl}" class="f14">首页</a></pg:first>
<pg:prev export="firstItem,pageUrl"><a href="${pageUrl}" class="f14">上一页</a></pg:prev>
<pg:pages export="pageNumber,firstItem,pageUrl">
<c:choose>
<c:when test="${pageNumber == currentPageNumber}">
<span class="current">${pageNumber}</span>
</c:when>
<c:otherwise><a href="${pageUrl}">${pageNumber}</a>
</c:otherwise>
</c:choose>
</pg:pages>
<pg:next export="firstItem,pageUrl"><a href="${pageUrl}" class="f14">下一页</a></pg:next>
<pg:last unless="current"><a href="${pageUrl}" class="f14">末页</a></pg:last>
<pg:page export="first,last">第${first}- ${last}条</pg:page>
</pg:index>
</pg:pager>
</body>
</html> 点下页是出现路径:http://localhost:8080/Shop/back/sysProducttype.do?method=showProducttype?paper.offset=10
我不想显示?paper.offset=10
在线等……
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %><%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>产品分类列表</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<pg:pager url="back/sysProducttype.do?method=showProducttype" index="half-full" maxPageItems = "10"
maxIndexPages="10" isOffset = "${false}" export = "currentPageNumber=pageNumber" scope = "request">
<table>
<c:forEach items="${producttype}" var="producttype">
<pg:item>
<tr>
<td height="39">${producttype.id}</td>
<td height="39">${producttype.name}</td>
</tr>
</pg:item>
</c:forEach>
</table>
<pg:index>
<pg:first unless="current"><a href="${pageUrl}" class="f14">首页</a></pg:first>
<pg:prev export="firstItem,pageUrl"><a href="${pageUrl}" class="f14">上一页</a></pg:prev>
<pg:pages export="pageNumber,firstItem,pageUrl">
<c:choose>
<c:when test="${pageNumber == currentPageNumber}">
<span class="current">${pageNumber}</span>
</c:when>
<c:otherwise><a href="${pageUrl}">${pageNumber}</a>
</c:otherwise>
</c:choose>
</pg:pages>
<pg:next export="firstItem,pageUrl"><a href="${pageUrl}" class="f14">下一页</a></pg:next>
<pg:last unless="current"><a href="${pageUrl}" class="f14">末页</a></pg:last>
<pg:page export="first,last">第${first}- ${last}条</pg:page>
</pg:index>
</pg:pager>
</body>
</html> 点下页是出现路径:http://localhost:8080/Shop/back/sysProducttype.do?method=showProducttype?paper.offset=10
我不想显示?paper.offset=10
在线等……
解决方案 »
- 关于SPRING加载
- 在MyEclipse中用jtds连接数据库出错
- Update.jsp(33,3) Attribute selected invalid for tag option according to TLD
- 怎样实现多个Tab页填充满了才出现下拉框功能?
- 关于使用poi访问excel文件的问题,急!!!-送分30
- 如何连续下载多个文件?
- 为什么我的tomcat速度会怎么慢???而且老错很奇怪的问题!请大家帮帮忙!
- 大侠来看一下,救命呀!
- 在jsp页面里多刷新几次,就出错了,是为什么了
- 【请教】关于linux下java项目发布的问题
- 有没有人帮帮我
- struts2的checkboxlist显示问题!
<from method="get">默认是get就会出来你可以改成
method="post"
你是说的:
点下页是出现路径:http://localhost:8080/Shop/back/sysProducttype.do?method=showProducttype?paper.offset=10
我不想显示?paper.offset=10 这个显示很好,为什么要改啊
baidu,google的分页都带啊.
如果想改可以考虑用:urlWrite或自己写过滤器.
在dispatchAction中不能识别这个方法啊
request.getParameter("page.offset");得不到啊?
是不是自定义标签哪不对啊.报错吗?
才发现,接的第二个参数不是&
自定义标签的问题吧!
struts-config.xml
配置指定了method=showProducttype没.
http://www.blogjava.net/jacky/archive/2007/02/05/98123.html
method=showProducttype&offset=10试试!
可以用:
a=10;
b=4;
form1.submit();
的方式