在action中
int n=1;
request.setAttribute(pageNo,new Integer(n));
在jspPage:
<bean:define id="intTotal" type="java.lang.Integer" property="pageNo"/>
<td>
<logic:lessEqual name="viewForm" property="pageNo" value="
                                                 <%= intTotal.intValue() %>
                                                          ">
        <a href="#" onClick="nextPage()">
</logic:lessEqual>
次へ
</a>
</td>
我就是想从action扔到jspPage一个int型值,以作为logic:lessEqual的value值。我上面作错误。请问我要怎么做?谢了。

解决方案 »

  1.   

    错误
    The server encountered an internal error () that prevented it from fulfilling this request.The class of JSP cannot be compiled
      

  2.   

    修改<bean:define id="intTotal" type="java.lang.Integer" property="pageNo"/>成为
    <bean:define id="intTotal" type="java.lang.Integer" name="pageNo"/>
    name是request范围内的对象名称
    property是对象的属性名称
      

  3.   

    <bean:define id="intTotal" type="java.lang.Integer" name="pageNo"/>
    还是不好用。
    有没有别的方式把值传过来?
      

  4.   

    你可以在form定义一个变量,然后在action中赋值。
    不好用的话,把错误贴出来
      

  5.   

    在form中定义变量的方法也不成,错误同上。