日期:2014-05-18  浏览次数:20643 次

用Struts标签怎么实现余数匹配操作??急!!~~~~
我用jstl的话是
<c:if   test= "${index%6==0} ">
...
</c:if>

现在要用Struts的标签实现,怎么实现?
我本来想用
<logic:match   name= "index "   value= "0 ">
...
</logic:match>
来匹配,但是不是怎么算index的余数

试着这样写是错的
<logic:match   name= "index%6 "   value= "0 ">
...
</logic:match>

请教各位大侠!!~~急!!~~~

------解决方案--------------------
用logic:equal试试,match好像基本上是匹配字符串的正则表达式的!
------解决方案--------------------
傻冒,你在FORMBEAN做一个参数不就的了
------解决方案--------------------
JSP头部引用el库
<%@ taglib uri= "http://struts.apache.org/tags-logic-el " prefix= "logic-el " %>
然后使用
<logic-el:match name= "${oneindex} " value= "0 ">
oneindex是你存入request.attribute的String key
你只需要改变request中的内容就动态的反映出来了