wood burning stoves*
The moose likes JSP and the fly likes How to access array stored in database through JSTL  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "How to access array stored in database through JSTL  " Watch "How to access array stored in database through JSTL  " New topic
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><cut 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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access array stored in database through JSTL