Quotation marks when mixing jsp and html forms

Discussion in 'Java' started by deepstar@gmail.com, Nov 15, 2005.

  1. Guest

    Hey all

    I'm trying to generate one list item per Sql row, but the code instead
    generates four individual droplists containing one item each. Any ideas
    on what might be wrong?

    ResultSet rslt = addStmt.executeQuery("SELECT name FROM topic");
    ResultSetMetaData rsmd = rslt.getMetaData();

    for (int i = 1; i <= rsmd.getColumnCount(); i++) {

    while(rslt.next()) {
    String getTopic = rslt.getString(i);
    getTopic = rslt.getString("name");
    %>

    <H3>Available topics:</H3>
    <br/>
    <form METHOD"POST" ACTION="mockup.jsp">
    <select size="1" name="view">
    <option value="yes"><% out.println(getTopic);%></option>
     
    , Nov 15, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Radith

    Using quotation marks

    Radith, Jan 7, 2005, in forum: Java
    Replies:
    1
    Views:
    443
  2. Tristan Miller
    Replies:
    54
    Views:
    1,462
    ???????? ????? ???????????
    Nov 6, 2003
  3. M. Clift

    String and quotation marks

    M. Clift, Oct 22, 2004, in forum: Python
    Replies:
    2
    Views:
    379
    M. Clift
    Oct 22, 2004
  4. Peng Yu

    Question about concatenating quotation marks

    Peng Yu, Oct 1, 2004, in forum: C Programming
    Replies:
    3
    Views:
    354
    Mark McIntyre
    Oct 2, 2004
  5. Junior
    Replies:
    4
    Views:
    325
    Dennis Lee Bieber
    Oct 27, 2007
Loading...

Share This Page