Hi David, Thanks for your response!
IConstants.USER_EMPLOYEE_LIST_KEY is a string of value "com.xyz.key.USER". I'm not sure that's the issue, because the session.getAttribute returned a correct ArrayList object employeeList and the for loop works fine. Any ideas? Thanks, Tuan -----Original Message----- From: David M. Karr [mailto:dmkarr@;earthlink.net] Sent: Sunday, October 20, 2002 12:45 PM To: [EMAIL PROTECTED] Subject: Re: <logic:present> return false >>>>> "Tuan" == Tuan H Le <[EMAIL PROTECTED]> writes: Tuan> Hi, Tuan> In my Action class I set an object in one of the session attribute before forwarding to a JSP view. But, the <logic:present> in the JSP view always return false on that object. Tuan> **************** My Action code *********************** Tuan> ... Tuan> session.setAttribute( USER_EMPLOYEE_LIST_KEY, employeeList ); Tuan> // Forward to the appropriate View Tuan> return ( mapping.findForward( target ) ); Tuan> ********* My JSP page ********************************* Tuan> <% Tuan> ArrayList employeeList = (ArrayList)session.getAttribute( IConstants.USER_EMPLOYEE_LIST_KEY ); Tuan> // ************************************************* Tuan> // THIS CODE WORK, BUT THE <logic:present> does not work Tuan> // ************************************************* Tuan> //for ( int i = 0; i < employeeList.size(); i++ ) { Tuan> // out.println( "i = " + i + "<BR>" ); Tuan> // EmployeeVO e = (EmployeeVO)employeeList.get( i ); Tuan> // out.println( "Employee ID --> " + e.getEmployeeId() + "<BR>"); Tuan> //} Tuan> %> Tuan> <logic:present name="employeeList" scope="session"> Tuan> <!-- Iterate over the results of the query --> Tuan> <logic:iterate name="employeeList" id="employee" scope="session" type="com.phs.ezhr.business.vo.EmployeeVO" indexId="idx"> Tuan> .... Tuan> </logic:iterate> Tuan> </logic:present> What is the value of "IConstants.USER_EMPLOYEE_LIST_KEY"? -- =================================================================== David M. Karr ; Java/J2EE/XML/Unix/C++ [EMAIL PROTECTED] -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org> -- To unsubscribe, e-mail: <mailto:struts-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>