struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Weßendorf <maili...@matthias-wessendorf.de>
Subject AW: logic:iterate -tag
Date Mon, 13 Jan 2003 07:59:22 GMT
thank you,

is it possible to create a bean with the <bean:define ...>-tag?
or must i you the <jsp:useBean ...>-Tag?

greetings

Matthias

----------------------------------------------------------------------------
--------
Matthias Weßendorf
Lange Strasse 17
D-44137 Dortmund
Tel.: (02 31) 1 89 15 95
Handy: (01 79) 1 11 89 79
Email: mailto:matthias@wessendorf.NET
URL: http://www.wessendorf.NET


-----Ursprüngliche Nachricht-----
Von: David M. Karr [mailto:dmkarr@earthlink.net]
Gesendet: Sonntag, 12. Januar 2003 23:26
An: struts-user@jakarta.apache.org
Betreff: Re: logic:iterate -tag


>>>>> "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>


--
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