解决方案 »

  1.   

    试试<s:if test="%{#pagebean.currentPage < status.index+2}">
      

  2.   

    楼主的pageBean在值栈里有了吗,还有struts2标签本身就支持ognl了不需要用%{}包起来
      

  3.   

    pagebean对象在ActionContext还是对象栈里?你先看在页面能不能打印出来%{pagebean.totalPage-1}的值。
    建议你直接用EL${ } 这个来取,不要用%{ }.
    你if里面的这一句改成这个试一试:${pagebean.currentPage < #status.index+2}