hi friends, Goodmorning,

I am having jsp page and java code. This java code is retrieving the companyname coloumn from database.
Now , how do i get the coloumn data into jsp code when i click the select box i need the data from javacode. the select box values should come from database.
How do i interconnect these two.

Code:
<html>
<head>
 <title>First Page</title>
</head>
<body bgcolor="wheat">
 <font face="Times New Roman,Times" size="+3">
  First Page.
 </font>
 <hr><p>
 <center>
 <form name="Frontpage" action="age.jsp" method="POST">
 <b>CD:</b> 
 <select name=FP onclick="STPUList()">
  <option> </option>
  
 </select>
 <input type="submit" name="Submit" value="Go">
 </form>
 </center>


</body>
</html>
and java code:
Code:
import java.sql.*;
public class firstpage
{
public static void main(String[] args)
    {
        try {
        Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                String dataSourceName = "emaildb";
        String dbURL = "jdbc:odbc:" + dataSourceName;
        Connection con = DriverManager.getConnection(dbURL, "",""); 
        
        Statement s = con.createStatement();
        s.execute("select distinct(CompanyName) as office from CompInfo"); 
        ResultSet rs = s.getResultSet();
        if (rs != null) 
        	
        while ( rs.next() ) 
            {
        	System.out.println("Data from CompInfo: " + rs.getString(1) );
        	        }
      
        s.close();
        con.close(); 
    }
        catch (Exception err) {
        System.out.println("ERROR: " + err);
    }
}
}
regards
rajaramesh