我通过<logic:iterate id="item" scope="request" name="all" indexId="ind">
得到数据库的数据,
现在想得到 int allname=${item.name}*${item.namea} 的值,
要怎么写呀,新手,请教
解决方案 »
- hibernate 的不明错误
- Hibernate问题
- 关于多线程方法级同步和代码块级同步的问题
- Hibernate查询优化问题 返回List
- hibernate分页很奇怪的问题,结果集合为0,但实际有100条记录
- 问一个用struts2专业结构来解决超链接<a>传值的问题
- Hibernate如何设置一对多cascade(在线等...)
- 关于j2ee架构的duck银行的例子?
- The Pet Store怎么部署?
- 大神看看ssh中上sql语句哪里有错 nested exception is org.hibernate.hql.ast.QuerySyntaxExceptio
- 能不能用ramdom()类产生汉字、英语字母、数字、符号综合的验证码
- java的一次编写到处执行现在还好用吗?
<%tempaddasa=tempaddasa+${news0.cratfrom*news0.cratno};%>
得到数据库的数据,
一般情况下我通过${item.name},${item.nameaa}得到数据,
但是现在要把得到的数据进行运算,就是说我要把 ${item.name},${item.nameaa}和值进行乘法运得然后得到值,
而且,但要通过jsp标记<%%> 输出显示
tempaddasa=${news0.cratfrom*news0.cratno};
<%=tempaddasa%>要怎么写呀,新手,请教
<c:set value="${item.name*item.namea}" var="tempaddasa"/>
while (it.hasNext())
{
Crananana item = (Crananana) it.next(); ssdfsf=ssdfsf+(item.getCraasda()*item.getCrasdasd());
}
request.setAttribute("ddasdasd,ssddadsfasf);我在action中通过这个方法实现了,页面上你用的这个方法还是没办法实现最后一步我要在循环中得到tempaddasa=tempaddasa+${item.name*item.namea}不过还是谢谢了