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

		// ȡӦֵд뵽ļ
		request.setCharacterEncoding("UTF-8");
		
		String pwd = request.getParameter("pwd");
		String number = request.getParameter("number");		
		String identity = request.getParameter("identity");
	
		
		// ȡʵ·
		String realPath = this.getServletContext().getRealPath("index.jsp");
		int end = realPath.lastIndexOf("/");
		realPath = realPath.substring(0, end+1);
						
		String folder = realPath + "AccountData";
		
		String message = "";
		
		Account a = SearchUtil.getAccountByName(number, folder);		
		if (a != null)
		{
			// ҵƥ˻

			message += "<tr><td>˻: " + a.getNumber() + "</td>";
			message += "<tr><td>: " + a.getAmount() + "</td></tr>";
			
		}
		else
		{
			message += "ûҶԶӦ˻";
			
		}		
		
		response.setContentType("text/html");
		// 
		response.setCharacterEncoding("UTF-8");
		response.setHeader("content-type","text/html;charset=UTF-8");
		
		PrintWriter out = response.getWriter();
		out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">");
		out.println("<HTML>");
		out.println("  <HEAD><TITLE>ѯ</TITLE></HEAD>");
		out.println("  <BODY>");
		out.println("<table align=\"center\">");
		out.println("<tr><td colspan=\"2\"> <h1>ѯ</h1></td></tr>");
		out.println("<tr><td colspan=\"2\"> <h2>ļ洢е</h2></td></tr>");
		out.print(message);
		
		out.println("<tr><td colspan=\"2\"> <h2>ݿе</h2></td></tr>");
		Connection conn=null;
        Statement stmt=null;
        ResultSet rs = null;
        
        
		try 
		{
			Class.forName("com.mysql.jdbc.Driver");
			String url = "jdbc:mysql://localhost:3306/bms";
			conn = DriverManager.getConnection(url, "root", "wang33");
			stmt = conn.createStatement();

			rs = stmt.executeQuery("select * from account where id = " + a.getId());
			
			rs.next();
			out.println("<tr><td>:</td>");
			out.println("<td>" + rs.getString("amount") +  "</td></tr>");
			
			
		} 
		catch (SQLException ee) 
		{
		   // TODO Auto-generated catch block
			out.println("SQLException"+ ee.toString()+ "<br/>");
		}
		catch(ClassNotFoundException ce)
        {
			out.println("ݿʧ<br/>");
			out.println(ce.toString()+ "<br/>");
        }
		
		out.println("<tr><td colspan=\"2\"><input type=\"button\" value=\"\" onclick=\"javascript:history.go(-1);\"/></td></tr>");
		out.println("</table>");
		out.println("  </BODY>");
		out.println("</HTML>");
		out.flush();
		out.close();
	}