<form method="post" action="paperEditQ.do">
Please select the subject you want to modify the database of :<select name="category">
<%
Statement st = DBConnection.DBConnection.DBConnect();
ResultSet rs = st.executeQuery("select * from papers");
while(rs.next()){
String paper = rs.getString(1);
out.print("<option>"+paper+"</option>");
}
%>
</select>
<input type="submit" value="Modify"/>
</form>
这是我的 Web 应用程序的第一页。我想使用 jstl 和 EL 标签在这个 jsp 页面上显示来自 mySQL 的数据(以摆脱 scriplets 并严格遵循 MVC)。我该怎么做?(一小段代码将不胜感激)。