在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 ()); ^
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 ()); ^
jspPage:<%=request.getArribute("mm")%>
2>Action: request.setArribute("mm",maxPageNo);
jspPage:<bean:define id="intTotal"
type="java.lang.Integer"name="maxPageNo"/>
都不好用。
.parseInt(request.getAttribute("page").toString())
: 1;得到页数直接用struts 的一个分页类,就行了