struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dmk...@earthlink.net (David M. Karr)
Subject Re: logic:iterate -tag
Date Sun, 12 Jan 2003 22:26:19 GMT
>>>>> "Matthias" == Matthias Weßendorf <mailings@matthias-wessendorf.de>
writes:

    Matthias> Hello everybody,
    Matthias> i am just trying to use the <logic:iterate ...>-Tag

    Matthias> this way was successfull:

    Matthias> THE CODE:
    Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
    Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
    Matthias> <jsp:useBean id="menge" class="access.Glossarbegriffsverwaltung"
    Matthias> scope="request"/>
    Matthias> <logic:iterate id="begriff" name="menge" property="begriffe">
    Matthias>     <bean:write name="begriff"/><br>
    Matthias> </logic:iterate>

    Matthias> END OF CODE

    Matthias> but i didn´t want to use the <jsp:useBean ...>-Tag
    Matthias> so i tried this one:

    Matthias> THE CODE:
    Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
    Matthias> <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
    Matthias> <logic:iterate id="begriff" name="menge" property="begriffe"
    Matthias> type="access.Glossarbegriffsverwaltung">
    Matthias>     <bean:write name="begriff"/><br>
    Matthias> </logic:iterate>
    Matthias> END OF CODE

    Matthias> but i get this error:
    Matthias> org.apache.jasper.JasperException: Cannot find bean menge in scope null

No surprise here.  The "logic:iterate" tag doesn't create beans, it just
references them.  The error message says it can't find a bean named "menge"
because you never created it.  You either have to use "jsp:useBean" or have the
bean put into the request scope in the action that forwards to this jsp.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
dmkarr@earthlink.net   ; SCJP; SCWCD




--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message