复杂的el 
1  请问下面的${bActionForm.container.account} 
表示什么含义 
2 <c:if test="${trans.transactionType ==5}"> 
则合理trans从哪里来的 
为什么前面有个c  
3 整个又表示什么含义。 
<TABLE id="selections" width="98%"> 
  <TBODY> 
  <TR> 
    <TH class="title" colSpan=8>Bets </TH> </TR> 
  <TR> 
    <TH> <BR> <tc:db code="sbets"/> </TH> 
    <TH class="right"> <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <tc:OddsMatrixBack code="todds"/> </TH> 
    <TH class="right"> <BR>&nbsp;&nbsp;&nbsp;# <tc:OddsMatrixBack code="tt_bets"/> </TH> 
    <TH> </TH> 
    <TH class="right money"> <SPAN class=currency>${bActionForm.container.account} </SPAN> <BR> <tc:OddsMatrixBack code="ybet"/> </TH> 
    <TH> </TH> 
    <TH class="right money"> <SPAN class=currency>${bActionForm.container.account} </SPAN> <BR> <tc:Ob code="tbet"/> </TH> 
    <TH class="right totalwin"> <SPAN class=currency>${bbBaseActionForm.containerMap.accountCurrency} </SPAN> <BR>&nbsp;&nbsp;&nbsp; <tc:Ob code="twin"/> </TH> </TR> 
  <TR> 
    <TD>${trans.multiplier!=true ? '&nbsp;&nbsp;Singles' : '&nbsp;&nbsp;Multipliers'} </TD> 
    <TD class="right"> <SPAN class="od display_block" id=odds_decimal_> <oddsFormat:formatOdds od="${trans.od}"/>&nbsp;&nbsp; </SPAN> </TD> 
    <TD class="right">&nbsp;&nbsp;&nbsp;1 </TD> 
    <TD class="right">x </TD> 
    <TD class="right money"> <fmt:formatNumber value="${trans.stake}" pattern="#,##0.00" /> </TD> 
    <TD class="right">= </TD> 
    <TD class="right money"> <fmt:formatNumber value="${trans.stake}" pattern="#,##0.00" /> </TD> 
    <TD class="right"> 
    <c:if test="${trans.transactionType != 5}"> 
<fmt:formatNumber value="${trans.stake+trans.resultAmount}" pattern="#,##0.00" /> 
</c:if> 
<c:if test="${trans.transactionType ==5}"> 
    <fmt:formatNumber value="${trans.resultAmount}" pattern="#,##0.00" /> 
</c:if>

解决方案 »

  1.   

    第一个${bActionForm.container.account}表示在页面上显示bActionForm对象中包含的对象container的属性的值。一般在使用是要将对象bActionForm先放在request or session中。
    第二个是EL的IF条件判断。和JAVA中的if差不多,只是这放在JSP中。在使用是要先在JSP页面头中导入EL的标签库。c就是标签库的别名。一般使用时是:
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
      

  2.   

    看看el表达式和jstl方面的书,就会明白了。
      

  3.   

    页面中的fmt也一样。只是导入的是另一个标签库。
    <%@taglib uri="http://java.sun.com/jsp/jstl/format" prefix="fmt"%>
      

  4.   

    对象bActionForm先放在request or session中。 请问一下 request 和 session 有什么不同 ?