Hi guys pls check this this is my code For poulating menu in jsp

Hi iam gettin one dropdown box in output but data from the table is not getting displayed will u pls solve this remedy

Hi guys pls check this this is my code

<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>

<head>

<title>Untitled Document</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>

<form name="form1" method="post" action="">

<select name="select">

<%Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:Shoy");

Statement st = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);

String prepJSQL = "select SUB_CAT from facilitypt";

PreparedStatement ps= con.prepareStatement(prepJSQL);

System.out.print(prepJSQL);

ResultSet rs = ps.executeQuery();

try {

while(rs.next()){

String jusersql = rs.getString(1);

System.out.println(jusersql);

%>

<option value="<%=jusersql%>"></option>

<%

}

%>

</select>

<%

}

catch (SQLException sqlex){//1st catch

sqlex.printStackTrace();

log("SQLException", sqlex);

}

catch(Exception ex){

ex.printStackTrace();

}

rs.close();

st.close();

%>

</form>

</body>

</html>

[1694 byte] By [Shoya] at [2007-11-27 2:34:55]
# 1
are u getting any exception?
mshanua at 2007-7-12 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
actually that page is displaying with one combo box it also has dropdownbut values from data base is not getting
Shoya at 2007-7-12 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
is this getting printed in your console?System.out.println(jusersql);shanu
mshanua at 2007-7-12 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
no i dont want it in console i want in web page u pls edit the code for necessarychange and help me pls
Shoya at 2007-7-12 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
areee bhaii...i am asking u "Are u getting those values printed in ur conssole?"
mshanua at 2007-7-12 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
no man it not even printed on console
Shoya at 2007-7-12 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
Possibly your query is not fetching any records from the database. Directly run the query from your command center and make sure that it returns records.SirG
SirGenerala at 2007-7-12 2:52:48 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...