File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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" %>

I agree. Here's the link:
subject: logic:iterate problem
jQuery in Action, 3rd edition