Accessing a array stored in database through JSTL, need urgent help

Hi,
I have a database table which contains a column storing the following structure:
Column Name:- Score_Data
Stores a structure in each row,
Structure Name:- Score_Datatype
Structure Values:- ScoreNumArray integer[], ScoreNAType character(2)
My aim is to access ScoreNumArray values and show it in a drop down box using JSTL.
Can someone please help me
Thanks
Saurabh.

Thanx for the prompt reply,
Actually the requirment is that my dropdown has following values 0,1,2,NA or 0,1,2,3,NA or 0,1,NA and so on....
thats why I made a user defined type in database(postgresql) and than storing int and char in it.
Can this be done through JSTL.
When I use the following code:
*<%@ include file="/html/common/init.jsp" %>
<% pageContext.setAttribute("colors",
new String[] {"red","green","blue","orange","black"} ); %>
<sql:query dataSource="jdbc:postgresql://10.10.33.39:5432/globus_db,org.postgresql.Driver,postgres,marines@123" sql="select
(\"Score_Data\").\"ScoreNumArray\" from \"Opex_Subparameters_Values_B\" where \"Short_Name\"='cs'" var="artists"/>
<table>
<c:forEach items="${ artists.ScoreNumArray }" var="row">
<c:forEach var="n" items="${row}"
varStatus="a">
<tr>
<td> <c:out value="${a.index}" /> </td>
<td> <c:out value="${a.current}" /> </td>
<td> <c:out value="${a.count}" /> </td>
<td> <c:out value="${a.first}" /> </td>
<td> <c:out value="${a.last}" /> </td>
<tr>
</c:forEach>
</c:forEach>
</table> *
I get no values for a.current, means it shows nothing.
Please suggest.
Thanks,
Saurabh.

Similar Messages

  • Request parameter are not stored in database through Java Bean

    Hi,
    I want to store the request parameter in database through Java Bean.Allthough program are properly run but value are not store in DB.
    Here My code:
    Login.html:<html>
    <head>
    <title>A simple JSP application</title>
    <head>
    <body>
    <form method="get" action="submit.jsp" >
    Name: <input type="text" name="User">
    Password: <input type="password" name="Pass">
    <input type="Submit" value="Submit">
    </form>
    </body>
    </html>SimpleBean.java:
    package co;
    import java.util.*;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.util.*;
    public class SimpleBean implements java.io.Serializable{
    private String User="";
    private String Pass="";
    public SimpleBean(){}
    public String getUser() {
    return User;
    public void setUser(String User) {
    this.User = User;
    public String getPass() {
    return Pass;
    public void setPass(String Pass) {
    this.Pass = Pass;
    public void show()
         try
    System.out.println("Printed*************************************************************");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Loading....");
    Connection con=DriverManager.getConnection("jdbc:odbc:Ex11dump");
    System.out.println("Connected....");
    PreparedStatement st=con.prepareStatement("insert into Table1 values(?,?)");
    System.out.println("~~~~~~~~~~~~~~~~~~~~");
    String User=getUser();
    st.setString(1,User);
    String Pass=getPass();
    st.setString(2,Pass);
    int y= st.executeUpdate();
    System.out.println(y);
    System.out.println("Query Executed");
    con.commit();
    con.close();
    System.out.println("Your logging is saved in DB *****************");
    catch(Exception e)
    e.printStackTrace();
    }submit.jsp:
    <jsp:useBean id="obj" class="co.SimpleBean"/>
    <jsp:setProperty name="obj" property="*" />
    <jsp:getProperty name="obj" property="User" /> <br>
    <jsp:getProperty name="obj" property="Pass" /> <br>
    <% obj.show();%>
    <%
    out.println("Ur data is saved in DB");
    %>Please Help me.
    Thanks.

    The issue is in the naming of your fields.
    Change User -> user and Pass->pass
    Name: <input type="text" name="user">
    Password: <input type="password" name="pass">

  • Access forms File stored in database

    Can any body help in this
    Call_Form('i:\test\fmb\entgrp');
    here entgrp is the FMX file stored in Server which is mapped to i:
    1 Now if i want to use this call_form
    to call the file stored in database what is the syntax
    2 and How to invoke this file from desktop using f45run
    3 The File Stored in Databse like this is fmb or fmx
    Thanks in Advance

    When you save a Form to the database it is the FMB that you save and not the FMX. So you'll need to have the FMX on a file system and call it from there.
    f45run recieves parameters such as userid=scott/tiger module=a.fmx
    Check out the help to see the full list.
    (P.S. Isn't it time you upgraded to a newer version of Forms?)

  • Need urgent help with database startup

    dear all,
    i am using oracle 10g on windower server 32 bit.
    i try to startup my database today, and it give me error, and it is my production database,
    i need very urgent help from you.(i have no rman backup , and the data is not so necessory, since it is for student practice.)
    SQL> startup open
    ORACLE instance started.
    Total System Global Area  524288000 bytes
    Fixed Size                   790180 bytes
    Variable Size             250343772 bytes
    Database Buffers          272629760 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    ORA-01110: data file 34: 'G:\ORACLE\DATAFILES_ACADEMY\ACADEMY'
    ORA-01115: IO error reading block from file 34 (block # 1)
    ORA-27070: async read/write failed
    OSD-04016: Error queuing an asynchronous I/O request.
    O/S-Error: (OS 23) Data error (cyclic redundancy check).regards.

    Maahjoor wrote:
    Hi dears,
    i need further assistance from your side, i have restarted the server, but the same problem.
    as there a way to drop and re-create a system tablespace? since the file 34 belong to system tablesapce.
    regardsNo.
    So just create a new database. That will take all of ten minutes. And tell your students to create new tablespaces. That will take them two minutes.

  • Storing rows returned back in Memory.Urgent Help please

    I have a method is thats all information from the Database and I need to hold this data
    in a HashMap of some sort of data structure
    Lets suppose this result set returns 5 rows.I need to hold all 5 rows in a datastructure.
    The variable f_OrderID is the principal and this should return back all values associated with it.
    I cant use HashMap as the key:f_OrderID is always the same,
    Key f_orderID
    Value :f_EffTs,f_ClrAcct f_MsgSeqNum
    Please can anyone help me how to store this in memory,
    using the same f_OrderID but with different values?
    public void getAcctChgDataFromDB(String orderNo,String indicator){
         if((rs == null) ){
                       logger.equals("No rows returned for Order No " + orderNo);
                       throw new AcctChgException("No rows returned for Order No " + orderNo );
                  }else
                                 while(rs.next()){
                                      f_OrderID  = rs.getString("FixOrderID");
                                      f_EffTs    = rs.getString("EffTs");
                                      f_ClrAcct  = rs.getString("ClrAcct");
                                      f_MsgSeqNum = rs.getString("FixMsgSeqNum");
             } catch (Exception e) {
                   e.printStackTrace();
       

    well i fell
    List<Map<String,Object>> or
    List<CustomDTOBean>could be a specific data structure which you can look for.
    where List would have reference to 5 Objects(Row) and each object could be a Map or a CustomDTO.If we consider map it would be like structure something like
    key=TABLE_COLUMN_NAME
    value=TABLE_COLUMN_VALUE

  • Have purchased adobe photoshop elements 13 from amazon and have been unable to find a 24 alpha numeric access code on box or on disc sleeve, need your help

    have purchased adobe photoshop elements 13 from amazon and have been unable to find a 24 alpha numeric access code on box or on disc sleeve, need your help

    do you have a white box inside the outer box and containing the disc sleeve/disc? In my case, it was on the white box. For Photoshop elements it is all numeric and starts with 1057.
    Brian

  • Open word file, stored in database through Forms.

    Assalam-o-Alikum
    to Genius of Oracle's
    I have stored the Word file name "MY_FILE.DOC" in oracle database. Now i want to open the file through Forms, remember i am using forms 6i. is there any body who help me to open the file.
    Best Regards
    Farrukh Shaikh

    Assalam-o-Alikum
    My in tension was not to hurt any body. if it did then sorry for that.
    here is the code through which i stored the file in database
    first create the DIRECTORY CREATE DIRECTORY generic AS 'C:\temp';---- --directory path where your files will be searched for storing.
    THEN
    create table my_blob_table
    pk_name varchar2(20) primary key,
    pk_value varchar2(20),
    col_document blob
    INSERT INTO MY_BLOB_TABLE
    (PK_NAME,PK_VALUE)
    ('A','A');
    COMMIT;
    CREATE OR REPLACE PROCEDURE load_blob_from_file
    ( src_file_name IN VARCHAR2
    , table_name IN VARCHAR2
    , column_name IN VARCHAR2
    , primary_key_name IN VARCHAR2
    , primary_key_value IN VARCHAR2 ) IS
    -- Define local variables for DBMS_LOB.LOADBLOBFROMFILE procedure.
    des_blob BLOB;
    src_blob BFILE := BFILENAME('GENERIC',src_file_name);
    des_offset NUMBER := 1;
    src_offset NUMBER := 1;
    -- Define a pre-reading size.
    src_blob_size NUMBER;
    -- Define local variable for Native Dynamic SQL.
    stmt VARCHAR2(2000);
    BEGIN
    -- Opening source file is a mandatory operation.
    IF dbms_lob.fileexists(src_blob) = 1 AND NOT dbms_lob.isopen(src_blob) = 1 THEN
    src_blob_size := dbms_lob.getlength(src_blob);
    dbms_lob.open(src_blob,DBMS_LOB.LOB_READONLY);
    278 Oracle Database 11g PL/SQL Programming
    END IF;
    -- Assign dynamic string to statement.
    stmt := 'UPDATE '||table_name||' '
    || 'SET '||column_name||' = empty_blob() '
    || 'WHERE '||primary_key_name||' = '||''''||primary_key_value||''' '
    || 'RETURNING '||column_name||' INTO :locator';
    -- Run dynamic statement.
    EXECUTE IMMEDIATE stmt USING OUT des_blob;
    -- Read and write file to BLOB.
    dbms_lob.loadblobfromfile( dest_lob => des_blob
    , src_bfile => src_blob
    , amount => dbms_lob.getlength(src_blob)
    , dest_offset => des_offset
    , src_offset => src_offset );
    -- Close open source file.
    dbms_lob.close(src_blob);
    -- Commit write.
    IF src_blob_size = dbms_lob.getlength(des_blob) THEN
    $IF $$DEBUG = 1 $THEN
    dbms_output.put_line('Success!');
    $END
    COMMIT;
    ELSE
    $IF $$DEBUG = 1 $THEN
    dbms_output.put_line('Failure.');
    $END
    RAISE dbms_lob.operation_failed;
    END IF;
    END load_blob_from_file;
    after create the PROCEDURE run the procedure
    begin
    load_blob_from_file('FILE_NAME.DOC',' my_blob_table','col_document','PK_NAME','A');
    end;

  • Webfolder access to XML stored in database is extremly slow (XP)

    Hello,
    I made a webfolder to access my XML-documents stored in the database over explorer. My OS is XP. But the access is extremly slow. When I access the documents from a Windows2000 computer the access is fast. Has anybody an idea what could be the reason for this??
    Any help appreciated.
    Anna

    None of them go throug the proxy server. Oracle suggests to install some XP-Patches what I have done. Now the webfolder access is normal. It is an XP ServicePack1 - problem.
    Thanks.
    Anna

  • How to download byte[] array, stored in database, as a file?

    We use Spring framework to develop our online system. Users now can upload their files. Data is stored in PostrgreSQL DB and associated with byte[] type attribute of a java class (through Hibernate). How can I perfom invert operation - transform a byte stream into a file and allow user to download it? Thanx

    public void writeToFile(byte[] b, String directory, String filename) throws IOException {
       File outputFile = new File(directory, filename);
       OutputStream outputStream = new FileOutputStream(outputFile);
       outputStream.write(b);
       outputStream.close();
    }

  • Failed to access database through applet! Please help!

    Hi there,
    I'm writing an applet to connect to a Microsoft Access 97 database situated on the same computer where the applet is invoked.
    In appletviewer, it works fine...
    appletviewer hello.html -J-Djava.security.policy=policy.plybut how could i get it run on Internet Explorer 5.0?
    It always complains about failure to find the class...
    Abstract of the program is shown below:
    public class TestDB extends JApplet{
         private Connection connection;
         private JTable table;
         public TestDB() {
              String url = "jdbc:odbc:test";
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   connection = DriverManager.getConnection(url);
              catch (ClassNotFoundException cnfe) {
                   System.err.println("Failed to load JDBC/ODBC driver");
                   cnfe.printStackTrace();
                   System.exit(1);
              catch (SQLException sqle) {
                   System.err.println("Connection Err");
                   sqle.printStackTrace();
              getTable();
              setSize(450,150);
         private void getTable() {
              Statement st;
              ResultSet resultSet;
              try {
                   String que = "SELECT * FROM ChartOfAcct";
                   st = connection.createStatement();
                   resultSet = st.executeQuery(que);
                   displayResultSet(resultSet);
                   st.close();
              catch (SQLException sqle) {
                   sqle.printStackTrace();
    Thank you so much!
    Jess

    Thank you.
    If i were to use a policy file... what should i do to let the browser know about that? Sorry i'm a completey idiot on this.
    expected outcome:
    typing an URL on the browser, say, http://abc.com/test.html --
    an applet will load and the database in the root folder (applet is also in here) would be retrieved.
    Thank you.
    Jess

  • Urgent help with HTML/arrays/insert into database through a bean

    I am currenly building an application that dynamically lists subjects and developers from a database. This list is used as a questionaire to ask developers what subjects will they be interested in attending or teaching. I having problem passing this data into the database on the bean level.
    I need help I have been working on this for months. I can explain further. I need to prove to my boss that I can do this project but i am currently stuck.

    Split your requirements into small pieces and ask them one by one, you will certainly get help here. But please make sure that you will do your home/office work.

  • I Need Urgent Help In Database migration

    I want to creat a Microsfe Access Project from an existing data on Oracle Server
    How Can I Do This? Is It Possible?

    Can you help me more with that.
    Yes - if you ask a question...
    Dim

  • I keep getting the message, an error occured while trying to access the service. I need urgent help!

    Please can someone let me know how long ExportPDF will be down for. I keep getting this message and i have an urgent work task

    Alice, you are very kind. I am in the Pacific NW - so PST is my time zone. It's past midnight here.
    There are a few ways to contact them:
    https://www.acrobat.com/misc/en/contact-support.html
    or:
    http://forums.adobe.com/docs/DOC-1515 if you scroll down it gives you the option...
    or:
    Our phone number is 800-833-6687
    I apologize, I just really wanted to get this solved for you.
    Please let me know the outcome.
    Sincerely, Stacy

  • How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    How to get the data from mysql database which is being accessed by a PHP application and process the data locally in adobe air application and finally commit the changes back in to mysql database through the PHP application.

    If the data is on a remote server (for example, PHP running on a web server, talking to a MySQL server) then you do this in an AIR application the same way you would do it with any Flex application (or ajax application, if you're building your AIR app in HTML/JS).
    That's a broad answer, but in fact there are lots of ways to communicate between Flex and PHP. The most common and best in most cases is to use AMFPHP (http://amfphp.org/) or the new ZEND AMF support in the Zend Framework.
    This page is a good starting point for learning about Flex and PHP communication:
    http://www.adobe.com/devnet/flex/flex_php.html
    Also, in Flash Builder 4 they've added a lot of remote-data-connection functionality, including a lot that's designed for PHP. Take a look at the Flash Builder 4 public beta for more on that: http://labs.adobe.com/technologies/flashbuilder4/

  • Not able to connect to database(MS SQL Server 2000) through JSTL tag

    Hi,
    I just want to retrieve some data from the database through a JSP page.I am using JSTL tags the code is as shown below. Whenever i execute this code i get an error message like this
    My Code:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <sql:setDataSource var="datasource"
    driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:mssqlserver:sqlserver://SYS57:1433;DatabaseName= sree"
         user=" "
         password=" "/>
    <sql:query var="res" dataSource="${datasource}">
    SELECT * FROM books
    </sql:query>
    <html>
      <head>
        <title>A First JSP Database</title>
      </head>
      <body>
        <table border="1">
          <tr>
            <td>id</td><td>title</td><td>price</td>
          </tr>
          <c:forEach items="${res.rows}" var="row">
          <tr>
            <td><c:out value="${row.id}" /></td>
            <td><c:out value="${row.name}" /></td>
            <td><c:out value="${row.author}" /></td>
          </tr>
          </c:forEach>
        </table>
      </body>
    </html>error is this:
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "No suitable driver"
         org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848)
         org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781)
         org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:93)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)root cause
    javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "No suitable driver"
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(QueryTagSupport.java:308)
         org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(QueryTagSupport.java:192)
         org.apache.jsp.firstdb_jsp._jspx_meth_sql_query_0(org.apache.jsp.firstdb_jsp:132)
         org.apache.jsp.firstdb_jsp._jspService(org.apache.jsp.firstdb_jsp:68)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I am not clear with url attribute of setDatasource tag... I feel the error is because of that line only..... Kindly tell me how to specify the jdbc URL for MS SQL Server 2000 while using JSTL tags for connection.
    Thanks,
    Akshatha

    unable to rectify the error........ tried lot but all in vain...still trying........
    my current code is:
    <%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
    <%@ taglib prefix="sql" uri="http://java.sun.com/jstl/sql_rt" %>
    <sql:setDataSource var="datasource" driver="com.microsoft.jdbc.sqlserver.SQLServerDriver"
    url="jdbc:microsoft:sqlserver://SYS57:1433;databaseName=sree" user="sa"
             password="dfgdfg"/>
    <sql:query var="res" dataSource="${datasource}">
      SELECT * FROM books
    </sql:query>
    <html>
      <head>
        <title>A First JSP Database</title>
      </head>
      <body>
        <table border="1">
          <tr>
            <td>id</td><td>title</td><td>price</td>
          </tr>
          <c:forEach items="${res.rows}" var="row">
          <tr>
            <td><c:out value="${row.id}" /></td>
            <td><c:out value="${row.name}" /></td>
            <td><c:out value="${row.author}" /></td>
          </tr>
          </c:forEach>
        </table>
      </body>
    </html>Thanks,
    Akshatha

Maybe you are looking for

  • Tecra M4 - tablet function not working

    Hey guys, please excuse my bad english first. I got a Tecra M4 and after installing xp tablet and drivers the tablte still doesn't work. Did I forget a driver? Which one is responsable for the tabletscreen? thx, marti

  • Why is it taking so long to process my order for the new IMac?

    why is it taking so long

  • TS1717 itunes wont open with my iphone

    due to having another computer... my iphone wont connect to itunes so i can download etc.... also my son has my old ipone which means has my old iphone email and password and it works on his phone. even though i deleted my info from his phone. yet he

  • Discoverer viewer is not installed

    Hello, I have recently installed Enterprise edition of 9IAS (1.0.2.2) on windows NT, after that I found discoverer is missing, is there any way just to re-install discoverer or am I missing anything !!! A.Kishore

  • Indesign 5.5 trial download

    I have been trying to download the trial version of Indesign 5,5 for hours,  the download does not seem to get off  the ground? est download time is 571 hours which is almost the same as the 30 trial period.  nb. I am not on a slow internet conection