Results 1 to 2 of 2
  1. #1
    saurabh.joshi is offline Member
    Join Date
    Aug 2007
    Posts
    4
    Rep Power
    0

    Question How to access array stored in database through JSTL

    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:
    <&#37;@ include file="/html/common/init.jsp" %>


    <sql:query dataSource="jdbc:postgresql://10.10.33.39:5432/globus_db,org.postgresql.Driver,postgres,marines@1 23" 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:out 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.
    Last edited by saurabh.joshi; 11-15-2007 at 02:18 PM.

  2. #2
    subra_28 is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

Similar Threads

  1. Upload excel data to access database
    By ravikumar.achi in forum New To Java
    Replies: 20
    Last Post: 01-19-2012, 12:30 PM
  2. Stored Procedures
    By geeta_ravikanti in forum JDBC
    Replies: 1
    Last Post: 04-22-2008, 03:34 AM
  3. Database "access"
    By Sathish in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 03-29-2008, 11:54 AM
  4. Replies: 1
    Last Post: 02-01-2008, 02:21 PM
  5. Replies: 1
    Last Post: 08-07-2007, 08:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •