You *can* use <bean:define>.  Be sure to look at the docs at 
http://jakarta.apache.org/struts/userGuide/struts-bean.html#define; it explains how 
this tag differs from <jsp:useBean>.

Sri

-----Original Message-----
From: Matthias Weßendorf [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 13, 2003 2:59 AM
To: Struts Users Mailing List
Subject: AW: logic:iterate -tag


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:[EMAIL PROTECTED]
URL: http://www.wessendorf.NET


-----Ursprüngliche Nachricht-----
Von: David M. Karr [mailto:[EMAIL PROTECTED]]
Gesendet: Sonntag, 12. Januar 2003 23:26
An: [EMAIL PROTECTED]
Betreff: Re: logic:iterate -tag


>>>>> "Matthias" == Matthias Weßendorf <[EMAIL PROTECTED]>
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++
[EMAIL PROTECTED]   ; SCJP; SCWCD




--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to