ESTO COMEÇANDO AGORA EM JSP E ESTOU COM UMA DUVIDA DE COMO COLOCAR A JANELA DE OPÇÕES NO CODIGO ABAIXO. OS RESULTADOS DO BANCO DE DADOS ESTA IMPRIMINDO CERTINHO NA TELA, MAIS NAO EM FORMA DE OPÇÃO.
<%@ page language="java" %>
<%@ page import="java.sql.*"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Prefeitos Mais Votados</title>
</head>
<body bgcolor="#CDC9C9">
<center>
<h1>Prefeitos Mais Votados</h1>
<h3>Escolha a Cidade</h3>
<%
Connection con;
Statement stm;
ResultSet res;
try {
Class.forName("com.mysql.jdbc.Driver");
con=DriverManager.getConnection("jdbc:mysql://localhost/resul_eleicoes","root","");
stm=con.createStatement();
res=stm.executeQuery("select nome from cidades order by nome");
while(res.next()) {
%>
<option value="<%=res.getString("nome")%>"><%=res.getString("nome")%></option>
<%
}
} catch(SQLException e) {
} catch(ClassNotFoundException e) {
}
%>
</center>
</body>
</html>