Quote:
Originally Posted by Deepa
Hi,
I need help in jsp to display values of an arraylist in jsp.
There is a java file containing a method which is returning an
arraylist.
I want to display the record of arrayList in jsp in tabular form say 10
records.
can anyone help me on this.
Thanks in advance.
Deepa
|
from jdbc or hibernate return List (with db data either using jdbc or hibernate)and set that list into request is best practice (or session ) like request.setAttribute("objList", objuserDatalist); and get list in jsp by using JSTL or EL expressions(like $list)
- <C:IF test="${not empty names}">
- <C:FOREACH var="objList" items="${objList}">
- <C:OUT value="${objList.name}"></C:OUT>
- <C:OUT value="${objList.id}"></C:OUT>
- </C:FOREACH></C:IF>