I'm using struts2. Through my action, I get a Hashmap from a Resultset of java:
ArrayList<HashMap<Integer,Object>> biReport = new ArrayList<HashMap<Integer,Object>>();
if(!(finalQuery.equals(""))){
ResultSet rsFinalQuery = conn.createStatement().executeQuery(finalQuery);
ResultSetMetaData md = rsFinalQuery.getMetaData();
int columnCount = md.getColumnCount();
while (rsFinalQuery.next()){
HashMap<Integer,Object> row = new HashMap<Integer,Object>();
for(int i=1; i<=columnCount; ++i){
row.put(i,rsFinalQuery.getObject(i));
}
biReport.add(row);
}
Now my issue is how can I display the table stored in my HashMap in jsp as a table using struts? I'm not using beans or HTTPservlet and I don't want to have java code in my jsp.
Would be great if you guys could help!
Aucun commentaire:
Enregistrer un commentaire