This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Struts and the fly likes logic:iterate problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "logic:iterate problem" Watch "logic:iterate problem" New topic

logic:iterate problem

AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137

I got a funny problem with logic: iterate.

With the following code:

<logic:iterate name="vHvnsDriverVec" id="vHvnsDriver1" scope="request">
<td><bean:write name="vHvnsDriver1" property="driverNo"/></td>
<td><bean:write name="vHvnsDriver1" property="licenceNumber"/></td>
<td><bean:write name="vHvnsDriver1" property="licenceState"/></td>

In the action i can see that the vHvnsDriverVec contains several
In the jsp the vHvnsDriverVec is not empty( i tested this with <logic:notempty> but the values are not displayed.

What am i doing wrong?

Thanks in advance

sreenath reddy
Ranch Hand

Joined: Sep 21, 2003
Posts: 415
Hi anil

The entries are there in action class fine but had u set that vector to request scope and u had used logic:notempty but there might be a chance that vector may be empty of size rell me if u r getting some error
AnilPrakash Raju
Ranch Hand

Joined: Jul 26, 2004
Posts: 137

I finally got it working.

It was my fault. I forgot to include :

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>

Have you tried LearnNowOnline?
subject: logic:iterate problem