当前位置: 代码迷 >> Java Web开发 >> 再问,一个从action向jspPage传值得有关问题
  详细解决方案

再问,一个从action向jspPage传值得有关问题

热度:47   发布时间:2016-04-17 15:24:59.0
再问,一个从action向jspPage传值得问题。
在actionForm中:int   pageNO=90;
                              viewForm.setMaxPageNo(pageNO);
<bean:define   id= "intTotal "   type= "java.lang.Integer "   property= "maxPageNo "/>
<td>
<logic:lessEqual   name= "viewForm "   property= "pageNo "
value= " <%=   intTotal.intValue()   %> ">
<a   href= "# "   onClick= "nextPage() ">
              </logic:lessEqual> <bean:message   key= "regs.nextbutton "   /> </a>
</td>
我就是想从action扔到jspPage一个int型值,以作为logic:lessEqual的value值。我上面作错误。请问我要怎么做?谢了。
错误
org.apache.jasper.JasperException:   The   JSP   file   which   cannot   compile   the   class   of   JSP:   Line   in   /pages/employeeView.jsp:   Error   occurred   is   error   of   [saburetsuto]   which   is   formed   with   161:   [javac]   Compiling   1   source   file   C:\Tomcat4.1\work\Standalone\localhost\Employeemanagement\pages\employeeView   _jsp.java:   435:   Symbol   cannot   be   solved.   Symbol:   Method   setValue   (int)   place:   Class   _jspx_th_logic_lessEqual_0.setValue   of   org.apache.struts.taglib.log   ic.LessEqualTag   (intTotal.intValue   ());   ^

------解决方案--------------------
int Page = (!request.getAttribute( "page ").equals( " ")) ? Integer
.parseInt(request.getAttribute( "page ").toString())
: 1;

得到页数。。。

直接用struts 的一个分页类,就行了
  相关解决方案