I have a quick question on iterating over an array list from a class file onto jsp file.
Snippet from a class file:
ArrayList al = new ArrayList();
public ArrayList getStatus() {
Object o;
this.Status = al; //contents of the array list
return Status;
}
Below is a snippet from the jsp file:
<jsp:useBean id="mybean" class="org.mypackage.process" scope="session" >
<jsp:setProperty name="mybean" property="input" value="hello" />
</jsp:useBean>
<jsp:getProperty name="mybean" property="status" />
When I run above, I get the arraylist as a bunch of string separated by commas. I need help in generating a table with the output from the array list. Can the array list be generated using forEach so that I can create tables.
I am not using any frameworks. I can run jstl tags on jsp.
Thanks in advance.