struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gbattine <gbatt...@alice.it>
Subject Cannot find bean in any scope
Date Sun, 07 Dec 2008 16:39:33 GMT

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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message