Hi,
thanks very much for your help.
I understood your explanation but I didn't solve.
Now I did:

<logic:iterate id="DVD" name="dvds" type="bean.DVD">
    <tr>
         <td><bean:write name="DVD" property="titolo"/></td>
         <td><bean:write name="DVD" property="regia"/></td>
         <td><bean:write name="DVD" property="sceneggiatura"/></td>
    </tr>   
</logic:iterate>

but I still have:

javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot find
bean: "DVD" in any scope

I'm missing something?
Thanks





Nils-Helge Garli wrote:
> 
> From the taglib reference for "iterate" [1]:
> 
> id - The name of a page scope JSP bean that will contain the current
> element of the collection on each iteration, if it is not null.
> 
> In your example, you have used id="dvds" which means that you would
> have to use <bean:write name="dvds" .... instead of name="DVD".
> 
> Nils-H
> 
> [1] -
> http://struts.apache.org/1.3.8/struts-taglib/tagreference.html#logic:iterate
> 
> On Sun, Dec 7, 2008 at 5:39 PM, gbattine <[EMAIL PROTECTED]> wrote:
>>
>> Hello guys,
>> I'm newbie of Struts, please help me.
>> I've an action that calls some business logic, retrieve a a list and set
>> it
>> into request, calling later a jsp, in which I try to show this list
>> through
>> iterate tag.
>>
>> this is jsp to show list
>>
>> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
>> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
>> <html>
>>    <head>
>>        <meta http-equiv="Content-Type" content="text/html;
>> charset=UTF-8">
>>        <title>JSP Page</title>
>>    </head>
>>    <body>
>>        <h2>Ricerca film</h2>
>>        <table border="1">
>> <thead>
>> <tr>
>> <th>Titolo</th>
>> <th>Regia</th>
>> <th>Sceneggiatura</th>
>> </tr>
>> </thead>
>> <tbody>
>>    <logic:iterate id="dvds" name="dvds" type="bean.DVD">
>>
>>     <tr>
>>         <td><bean:write name="DVD" property="titolo"/></td>
>>         <td><bean:write name="DVD" property="regia"/></td>
>>         <td><bean:write name="DVD" property="sceneggiatura"/></td>
>>
>>    </tr>
>>
>>    </logic:iterate>
>>
>> this is action that pass to list a list of dvds
>> Collection c = new ArrayList();
>>        try {
>>            c = manager.getAll();
>>                    } catch (DAOException e) {
>>            String message = "DVDs could not be listed";
>>            errors.add("label", new ActionError("error.listfailed"));
>>            saveErrors(request, errors);
>>            return (mapping.findForward("error"));
>>
>>
>>        }
>> session.setAttribute("dvds", c);
>>
>>
>> besides dvd (shown in jsp) is a bean to show each item of dvds list.
>> Instead of show jsp with list of dvd I've this error:
>>
>> javax.servlet.ServletException: javax.servlet.jsp.JspException: Cannot
>> find
>> bean: "DVD" in any scope
>>
>> How can I solve it?
>> please help me,
>> Thanks
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Cannot-find-bean-in-any-scope-tp20882790p20882790.html
>> Sent from the Struts - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Cannot-find-bean-in-any-scope-tp20882790p20893064.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to