<c:forEach var="fs" items="${item.fsCases}" varStatus="status">
${status.count}
</c:forEach>
如果fs集合里有4个元素
这样显示的是:1 2 3 4
我想只显示元素个数4怎么处理?
status.index
status.index显示的是0 1 2 3
你不会想个办法加工一下么?
在forEach里面加上 begin="开始index" end="结束index"
指定end用来做什么?就是要循环完所有元素的
${status.index + 1}
已解决,方法如下:
Java code:
<c:forEach var="fs" items="${item.fsCases}" varStatus="status">
<c:if test="${status.last}">
${status.count}
</c:if>
</c:forEach>
在你的 bean 中增加一个 getSize() 方法
Java code:
public int getSize() {
return (fsCases == null ? 0 : fsCases.size());
}
页面上直接用 ${item.size}
相关问答:
写了个测试程序如下
struct hostent *hp;
char AlarmDevIP[20];
int x2;
hp = gethostbyname("www.google.com");
if (hp)
{
......
两个文件1.PC,1.inc
1.PC有操作oracle数据库的 ,1.inc也有操作oracle数据库
在其他数据中如informix 中$include 1.inc就可以使用了
在ORACLE数据库重 $include 1.inc不可用 EXEC SQL include 1.inc也不可 ......
如题,C/C++中的execl怎么调用写好的java程序,
execl("/opt/java1.5/bin/java","MyClass",NULL);
这样的不行哦。
不会.
运行java程序
找工具查看一下那个程序的命令行
搜索下:jni ......
分别用结构化方法和面向对象方法编程实现下面要求:
对Circle和Rectangle实现以下功能Center,Move,Rotate,Print.
自己先订以下,这是一个刚学习计算机的人问我的
学习,看看
继续顶哦
学习了。
go o ......