This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
Hello everyone, I have a rather long list of select options, and I also have a mysql table that contains that very same data. I'd like to be able to streamline the data from the table into my select menu. I know enough of .jsp (and some java) to read data from a table but don't know enough to do something like this. I know that I need to write a bean, but that's about all. Could anyone please refer me to any code examples so I could see what needs to happen? Thanks in advance.
vjy chin
Ranch Hand
Joined: Feb 17, 2005
Posts: 279
posted
0
Hi, One simple way is to connect to the database and get the values and store them in an array or arraylist. The inside the select box, you just need to iterate the array or arraylist.
Hi again, I did try the code above and for some reason my options get populated with "vOptions.get(i)" instead of data. I understand the problem has to do with my syntax, but could someone tell me please what syntax to use to get the array data out? .... Vector vOptions = new Vector(); while(rs.next()){