Problem with retrieving a collection object from JSP

Hi Im using an action servlet to retrieve data from a database table, I save the data in to a collection and pass it using req.setAttribute. here's my code snippet:

timecardSQL timesql = new timecardSQL(con);

Collection col = timesql.findAll();

req.setAttribute(BeanNames.TIME_LIST, col);

return mapping.findForward("success");

I tried to retrieve the data through JSP using:

<logic:iterate name="timeList" id="columns" scope="request" type="webtm.database.timecard.timecardCOLS">

but it didn't work, JSP produced this error:

"Cannot find bean timeList in scope request" what does this mean? I can't understand it so I tried a different method, this time I used:

Collection col = (Collection) request.getAttribute("timeList");

if (col == null)

out.println("empty collection");

else

out.println("not empty");

Unfortunately, it prints out "empty collection",

why is the collection object not passed on to the JSP page?

Please help! Thanks!

Raymond

[1074 byte] By [rcw823] at [2007-9-27 0:14:03]
# 1
well it should be there just try to print out all the request attributes using pageContext.getAllAtributes(REQUEST_SCOPE) and check, I guess something wrong with naming BeanNames.TIME_LIST, is it "timeList"-Rishi
rishikh at 2007-7-4 15:15:20 > top of Java-index,Other Topics,Patterns & OO Design...