>----- Original Message -----
>From: Marcin Baj <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, March 30, 2001 2:37 PM
>Subject: iterate tag, once again
>

>Hello,
>I've read themessage:
>
>You must use <jsp:useBean> to introduce a reference to an existing bean, if you wish 
>to reference that bean with other
standard JSP tags (such >as <jsp:getProperty> or <jsp:setProperty>). If you only wish 
to reference such beans with other
Struts tags, use of <jsp:useBean> is not >required.
>
>,so I thougth, that I shouln't write something like this, because I don't like it:
>
>
><jsp:useBean id="LanguageBean" class="custom.LanguageBean" scope="session">
><table>
><logic:iterate id="lang" name="LangBean" property="id" scope="session" >
> <tr>
>    <td align="left">
>      <bean:write name="lang"/>
>    </td>
> </tr>
></logic:iterate>
></table>
>
>I wanted to write something in that way:
>
><table>
><logic:iterate id="lang"
>    name="custom.LanguageBean"
>    property="langCollection"
>    scope="application">
>  <tr>
>    <td align="left">
>      <bean:write name="lang"/>
>    </td>
>  </tr>
></logic:iterate>
></table>
>
>but it doesn't work. Why? I don't want to use <jsp:useBean  ..../>
>
Could you give the error message ? What does the browser display ?

Here are some points you can check:
- do you include the tags to use the taglibs ?
- do you put your bean in application scope under the name "custom.LanguageBean" 
somewhere (for example in an Action) ?
- does this bean have a method getLangCollection() giving a collection ?

Hope this help,

Jean-Noel

Reply via email to