[]后台查询出来的数据,再前台做了下拉列表的有关问题

[求助]后台查询出来的数据,再前台做了下拉列表的问题
问题如下:后台查询出来的问题在前台做了下拉列表,我想要完成的是,如过我选择了某个值,那么这个值对应的数据显示在后边

比如:我选择了1,则1对应的名字要显示出来,如何办

代码如下
package com.mtqj.quotes.model;

public class Material {

private int M_id;
private String Material;
private int Price;

public int getM_id() {
return M_id;
}

public void setM_id(int m_id) {
M_id = m_id;
}

public String getMaterial() {
return Material;
}

public void setMaterial(String material) {
Material = material;
}

public int getPrice() {
return Price;
}

public void setPrice(int price) {
Price = price;
}

}


package com.mtqj.quotes.servlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.mtqj.quotes.Util.DBUtil;
import com.mtqj.quotes.model.Material;

public class QuotesServlet extends HttpServlet {

public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletExceptionIOException {

// 查询数据
ArrayList<Material> materialList = new ArrayList<Material>();
String sql = "select * from Material;";
Connection conn = DBUtil.getConn();
PreparedStatement ps = null;
ResultSet rs = null;

try {
ps = conn.prepareStatement(sql);
rs = ps.executeQuery();
while (rs.next()) {
Material m = new Material();
m.setM_id(rs.getInt("M_id"));
m.setMaterial(rs.getString("Material"));
m.setPrice(rs.getInt("Price"));
materialList.add(m);
//System.out.println(m);
}

} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

request.setAttribute("materialList", materialList);
request.getRequestDispatcher("/index.jsp").forward(request, response);

}

public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {

doGet(request, response);
}

}


<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>

<body>
This is my JSP page.
<br>

<table align="center" border="1">

<c:if test="${not empty materialList }">
<select>
<c:forEach items="${materialList}" var="u">
<option value="${u.m_id }">${u.material}</option>

</c:forEach>
</select>
</c:if>


</table>
</body>
</html>

------解决思路----------------------
<c:if test="${not empty materialList }">
                <select>
                    <c:forEach items="${materialList}" var="u">
                        <option value="${u.m_id }">${u.material}</option>    
                    </c:forEach>
                </select>