page-taglib分页问题

2019-03-25 13:35|来源: 网路

想做个分页,用page-taglib怎么没反应,大家帮忙看下

online waiting...................

页面:

<pg:pager url="databank.do"
  index="half-full"
  maxPageItems="10"
  maxIndexPages="5"
  isOffset="<%=false%>"
  export="pageOffset,currentPageNumber=pageNumber"
  scope="request">
  <pg:param name="op" value="queryAll"/>
      <c:forEach items="${databankList}" var="databank">
     <pg:item>
     ${databank.employee.empName}    
     </pg:item> 
  </c:forEach> 
</pg:pager>

action:

public ActionForward queryAll(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {

int pagIndex = 1;
int pagNum = 20;

List<Databank> databankList = this.databankBiz.findDataBankByPage(pagIndex, pagNum);
System.out.println("-------------"+databankList.size());
request.setAttribute("databankList", databankList);
return mapping.findForward("pagination");
}

struts-config.xml:

<action path="/databank"
type="org.springframework.web.struts.DelegatingActionProxy"
name="databankInfo"
scope="request"
parameter="op">
<forward name="pagination" path="/testPage.jsp"/>
</action>

spring:

<bean name="/databank" class="org.onlineoa.www.web.actions.DataBankAction">
<property name="databankBiz" ref="databankBiz"/>
</bean>



为什么会没反应呢???????
连调用action都没调用到。。。。。到底怎么回事

相关问答

更多
  • 当你使用taglib时,容器通常是: 从_jspService中写入并调用一个帮助器方法 在helper方法内部创建标记类的一个实例并调用标准方法(setParent(),doStartTag(),doEndTag()等) 这将所有代码保留在同一资源中(请求不会传递到另一个组件),因此允许您构建循环行为并访问当前页面上的其他组件。 在学习标签库中有开销。 但是,一旦你有了第一个标签,它就会全力以赴。 最后的结果对于非开发人员来说也更容易理解(假设您为标签选择了好名字)。 When you use a tag ...
  • 您的taglib URI不正确,您正在使用旧的pre-pre-JSP 2.0库的URI。 代替 http://java.sun.com/jstl/core 它应该是 http://java.sun.com/jsp/jstl/core Your taglib URI is incorrect, you're using the URI of the old pre-expression, pre-JSP 2.0 library. Instead of http://java.sun.com/jstl/core ...
  • 除了修复的分页的Twitter引导程序插件之外,没有一个。 Beyond the Twitter bootstrap plugin which fixes the pagination for , there isn't one.
  • 因为我发现分页系列仅适用于display: block; 项目,所以我找到了几乎适用于任何情况的解决方案。 很简单。 只需在下面的类中添加一个div即可。 .page-break { page-break-after: always; height: 0; display: block; // optional. must be sure it is block item in document flow clear: both; // optional. use only if yo ...
  • 你可以这样做: 将jsp页面分成三个部分(header.jsp,body.jsp和footer.jsp)。 定义模板以包含这些页面。 在header.jsp文件中声明taglib。 现在您可以在正文页面中使用taglib。 You can do follow this way: Separate your jsp page to three parts (header.jsp, body.jsp and footer.jsp). Define a template to include those page ...
  • 因为每个JSP都独立于其他JSP。 Tiles使用动态包括幕后。 而像Tiles这样的模板引擎的全部意义在于能够在多个布局中使用相同的组件,并在同一布局中使用多个组件。 组件的代码取决于它所包含的布局并不是一个好主意。 Because each JSP is independant from the others. Tiles uses dynamic includes behind the scenes. And the whole point of a templating engine like Ti ...
  • taglib存在的问题是,我用来清理html的库非常正确地将标记转换为小写,因为html不区分大小写。 这样做的麻烦在于,grails标签区分大小写,因此找不到标签“isLoggedIn”。 The taglib does exist the problem was that the library I use to clean up the html quite rightly converts the tags to lowercase since html is not case sensitive. ...
  • 我觉得你很接近。 现在尝试运行此代码: data = list(query_results.fetch_data()) # changed from `iterator` to `data` the variable name 页面令牌的管理是自动完成的。 I think you are close. Try running this code now: data = list(query_results.fetch_data()) # changed from `iterator` to `data` ...
  • 我们删除了页面:CakePHP2.4中的1个部分,因为它没有真正的用途并且使SEO无效(/和/ page:1访问同一页面)。 请参阅迁移指南 我的提示:301重定向(通过htaccess或一些自定义组件)旧的URL到新的URL。 比 你不需要它 这都是SEO友好(没有果汁丢失) 这是未来的证明 简单的CakePHP实现可能是: 如果命名为param action page == 1 然后使用没有命名param页面的新url = old url重定向(new url,301) We removed the p ...
  • 我能为您提供的最佳解决方案是使用来自雅加达的退役标签库。 它仍然有效,但它们不再支持或维护。 链接可以在这里找到 您将感兴趣的是“ 输入 ”标记库,其中包含以下字段的标记: 形成 文本 密码 textarea的 隐 选择 选项 无线电 复选框 The best solution I can provide for you is to use a retired tag library from jakarta. It still works but it is no longer supported or ...