You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mahin Jeyachandran <ma...@hotmail.com> on 2003/10/29 13:38:16 UTC

a problem with the .. help needed

Good day ,
In my jsp page I have these...
<logic:iterate id="empRecord" name="empForm" property="employeeList" scope="session">
<tr>
 <td> <bean:write name="empRecord" property="empName" /> </td>
 <td> <bean:write name="empRecord" property="empId" /> </td>
 <td> <bean:write name="empRecord" property="department" /> </td>
 <td> <bean:write name="empRecord" property="salary" /> </td>
</tr>
</logic:iterate> 

also I have a ActionFORM Named "EmpForm" and method like

" public Vector getEmployeeList() " which returns a vector containing objects of the class "Record"

public class Record
{
    private String _empName ;
    private String _empId ;
    private String _department;
    private String _keyValue; 
    private int _salary ;

    // and also  ... appropriate setter and getter methods
    public void setEmpName( String name ) { }
    getEmpName() , setEmpId() , getEmpId() etc.... 
}

I have to print the values of these records in my jsp Page..

but I get an error message like..
javax.servlet.jsp.JspException: Cannot find bean empRecord in any scope
        at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:839)
        at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286)
        
can anyone help me with this

regards,
Mahin