| Author |
How to access array stored in database through JSTL
|
Saurabh Joshi
Ranch Hand
Joined: Nov 15, 2007
Posts: 37
|
|
Hi, Can I use JSTL for accessing the array elements stored in the database column. The Scenario is: I have a user defined type SCORE_DATATYPE(SCORENUMARRAY integer[], SCORENATYPE character(2)) Score_Data is the column name where the SCORE_DATATYPE is stored. My question is using JSTL can I access the array elements of SCORENUMARRAY in a drop down box? ____________________________________________________________________________ I am using a similar type of code as following:
<%@ include file="/html/common/init.jsp" %> <sql:query dataSource="jdbc:postgresql://10.10.33.39:5432/globus_db,org.postgresql.Driver,postgres,marines@123" sql="select \"Array_Test\" from \"testing\" where \"test1\"=0" var="artists"/> <table> <c:forEach var="n" items="${artists.rows}" varStatus="a"> <c:forEach var="item" items="${n}"> <tr> <td><c  ut value="${item}"/></td> </tr> </c:forEach> </c:forEach> </table>
the output is: Array_Test={0,1,2,3} not the elements of the array, actually the point here is that the var artists is taking the whole array as its value not the individual elements. ___________________________________________________________________________ Please reply, your guidance is needed. Thanks & Regards, Saurabh Joshi.  [ November 15, 2007: Message edited by: Saurabh Joshi ] [ November 15, 2007: Message edited by: Saurabh Joshi ]
|
 |
 |
|
|
subject: How to access array stored in database through JSTL
|
|
|