tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinay" <>
Subject Counter using Struts Taglibs
Date Thu, 06 Feb 2003 23:26:12 GMT
Hi All,
    How can I define counters using Struts EL tag libraries for printing purposes in JSP pages

Here is an example

<table border="1">
 <c:forEach var="transid" items="${trans.transactions}">
  <td><c:out value="${transid.acctno}"/></td>
  <td><c:out value="${transid.testcode}"/></td>

if($transid.testcode=="ts"  ) tscount=tscount+1;   

  <td><c:out value="${transid.srcfac}"/></td>
   <td><c:out value="${transid.dateofservice}"/></td>
   <td><c:out value="${transid.htkey}"/></td>


In the above code i would like to print the total and number of iterations the for loop performed.

I would also like to do some condition to inside the for loop to print another specific counter

    if($transid.testcode=="ts"  ) tscount=tscount+1;   

I am novice and  have recently started using these tag libraries.Is there a link or web site
which has tutorials on how to use the tag libraries.

Any help appreciated



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message