Complex structure in JSTL

J

Johnny

Hello everyone,

I have a difficult question about JSTL.

I have following strutures in my WebApp but I don't know how to
reterieve data from it using JSTL.

So first, I have a container class for data. Code snippet is below.
It contains different objects stored by key value.

public class UserResponse extends Hashtable
{
public UserResponse(){
}

// Getter
public Object getResponse(String key) {
return get(key);
}
// Setter
public void setResponse(String key, Object value) {
put(key, value);
}
}

Then I have a ordinary SessionBean like this
public class SessionInfoBean implements java.io.Serializable
{
private String SessionID;
private String RowRecord;
private String RowNumber;
...
and I read them from database and store them into an ArrayList.
like this way

ArrayList SessionsList = new ArrayList();
while (rs.next())
{
SessionInfoBean sessionInfoBean = new SessionInfoBean();
sessionInfoBean.setSessionID(rs.getString("sessionid"));
sessionInfoBean.setRowNumber(Long.toString(rs.getLong("row_number")));
sessionInfoBean.setRowRecord(rs.getString("rowrecord"));
SessionsList.add(sessionInfoBean);
}

Then I store the ArrayList of SessionInfoBean intems into UserResponse
object that is descripted in the beginning this message. Code look like
this:

userResponse.setResponse(Constants.DATA_BY_ID, (Object) SessionsList);

The question is: Can I iterate all properties that are in ArrayList stored
into SessionInfoBean items using JSTL?

Is this too complex or can it be resolved?

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top