struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ben" <>
Subject notEmpty/empty and interation
Date Mon, 07 Jul 2003 14:05:15 GMT

Using struts1.1 I have problems getting the iterate tag working.
the page scoped id bean for the element is never found. This happens when
the collection is empty or contains values.

Help is greatly appreciated.


I store a Collection under "oss_prod_list" in my session, with the following
jsp snippet:

<logic:empty name="oss_prod_list">
No products available.
<!-- @TODO: notEmpty tag does not work for some reason -->
<logic:notEmpty name="oss_prod_list">

<logic:iterate name="oss_prod_list" id="prod_list_el">
<bean:write name="prod_list_el" property="name" />

I get the empty as well as the not empty printed out when the collection is
empty or not. When i remove the content between the iterate tag my jsp
works, when not I get always (when collection is empty or not) the exception
that the id bean specified as iteration element is not found:

root cause

javax.servlet.ServletException: Cannot find bean prod_list_el in any scope

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message