I want to retrieve values from database to drop down box in servlet .I want database values in place of a and b.
Tim Moores wrote:Once you have retrieved the values from the DB you can use them however you like, including using them in a servlet. What do you have so far, and where are you stuck making progress?
Tim Moores wrote:The out.println statement looks completely messed up. It seems that you're printing a Java statement to the HTML output. I think you're missing some double quotes in there, and you shouldn't repeat the "out.println" part.
Also, you've checked that the ResultSet is not empty, yes?