我有在JSP 1个组合框中填充有值从SQL数据库上的形式的负载填充组合框
<td width="150">
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection cn = DriverManager.getConnection("jdbc:odbc:mydsn");;
Statement s = cn.createStatement();
ResultSet re = s.executeQuery("select distinct From1 from station");
%>
<select>
<%
while (re.next()) {
String un = re.getString("From1");
%>
<option value="<%= un%>"><%= un%></option>
<%
}
%>
</select>
</td>
我已经在其下方的另一个组合框,我希望它被填充的基础上第一个组合框的选定值... PLZ帮助代码
Scriptlets已过时,请使用sql-jslt样式。 stackoverflow.com/questions/7697041/how-to-use-jstl-sql-tag – 2013-02-11 11:14:22