| Author |
jstl ArrayList from session
|
Alessandro Ilardo
Ranch Hand
Joined: Dec 23, 2005
Posts: 218
|
|
Hi there, I'm trying to implement the jstl lib into my webapp. My application is an MVC pattern which has a servlet, that stores a collection of objects in the session scope as an ArrayList. I would like to display each object as a record in an html table row. What's the simplest way to do it? The examples on the web didn't help much. Would anyone be so kind to show me an example? Thanks in advance I've already added the jars into my tomcat 5.5.9 [ January 16, 2007: Message edited by: Alessandro Ilardo ]
|
trying to decode a woman mind....
|
 |
Alessandro Ilardo
Ranch Hand
Joined: Dec 23, 2005
Posts: 218
|
|
The output is: No application errors. But title and description are not displayed. Any suggestions on how to get those properties as well?
|
 |
Stefan Evans
Bartender
Joined: Jul 06, 2005
Posts: 1003
|
|
Given that the id is being retrieved correctly, it looks like JSTL/EL is working fine, and the issue is with your class structure, or your data. Does your class of your "item" have methods getTitle() and getDescription() as well as getId()? Have those values been populated? Where do you create this list in the session attribute "newsList" ? Cheers, evnafets
|
 |
Adeel Ansari
Ranch Hand
Joined: Aug 15, 2004
Posts: 2874
|
|
|
Those might be null. null value is converted to an empty string when using JSTL.
|
 |
 |
|
|
subject: jstl ArrayList from session
|
|
|