<s:if test="${pb.totalPage>0}">//这种写法有问题。
<tr >
<td colspan="6" align="right" >
<table border="0">
<tr>
<td > </td>
<td align="center" ><a id="firstpage" href="#" style="cursor: hand">首页</a>
<a id="lastpage" href="#" style="cursor: hand">上页</a>
<a id="nextpage" href="#" style="cursor: hand">下页</a>
<a id="endpage" href="#" style="cursor: hand">末页</a></td>
<td width="120px" align="center"" >
第<font id="currentpage" color="blue">${pb.currentPage}</font>页
共有<font id="totalrec" color="blue">${pb.totalPage}</font>记录
</td>
</tr>
</table>
</td>
</tr>
</s:if>
如下写法没有问题
<s:if test="#request.pb.totalPage>0">
<tr >
<td colspan="6" align="right" >
<table border="0">
<tr>
<td > </td>
<td align="center" ><a id="firstpage" href="#" style="cursor: hand">首页</a>
<a id="lastpage" href="#" style="cursor: hand">上页</a>
<a id="nextpage" href="#" style="cursor: hand">下页</a>
<a id="endpage" href="#" style="cursor: hand">末页</a></td>
<td width="120px" align="center"" >
第<font id="currentpage" color="blue">${pb.currentPage}</font>页
共有<font id="totalrec" color="blue">${pb.totalPage}</font>记录
</td>
</tr>
</table>
</td>
</tr>
</s:if>
谁能告诉我原因,为什么上一种是错误的。
<tr >
<td colspan="6" align="right" >
<table border="0">
<tr>
<td > </td>
<td align="center" ><a id="firstpage" href="#" style="cursor: hand">首页</a>
<a id="lastpage" href="#" style="cursor: hand">上页</a>
<a id="nextpage" href="#" style="cursor: hand">下页</a>
<a id="endpage" href="#" style="cursor: hand">末页</a></td>
<td width="120px" align="center"" >
第<font id="currentpage" color="blue">${pb.currentPage}</font>页
共有<font id="totalrec" color="blue">${pb.totalPage}</font>记录
</td>
</tr>
</table>
</td>
</tr>
</s:if>
如下写法没有问题
<s:if test="#request.pb.totalPage>0">
<tr >
<td colspan="6" align="right" >
<table border="0">
<tr>
<td > </td>
<td align="center" ><a id="firstpage" href="#" style="cursor: hand">首页</a>
<a id="lastpage" href="#" style="cursor: hand">上页</a>
<a id="nextpage" href="#" style="cursor: hand">下页</a>
<a id="endpage" href="#" style="cursor: hand">末页</a></td>
<td width="120px" align="center"" >
第<font id="currentpage" color="blue">${pb.currentPage}</font>页
共有<font id="totalrec" color="blue">${pb.totalPage}</font>记录
</td>
</tr>
</table>
</td>
</tr>
</s:if>
谁能告诉我原因,为什么上一种是错误的。
解决方案 »
- dwr初学很困惑
- don't flush the session after an exception occurs
- 国际化,资源文件,key大家都是怎么命名的?
- description The server encountered an internal error
- 当在web.xml里面配置struts2就会报错。
- 有关jbuilder与jsp 的问题
- 菜鸟问题,大家帮我看看!!!!!!!!!
- jbuilderx与weblogic!在win 2000高级服务器下怎么配置啊??
- 关于类的一些问题?
- 菜鸟急救:::请问在WIN2000下如何安装JSP
- Google Maps v3 中交通的问题
- tomcat部署与访问
多半 是指多数的struts2标签。。
用jstl 就行,平常说的c标签