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

		String message = "";
		String operator = "";
		String operatorType = "";
		// ȡCookieϢ
		Cookie cklist[] = request.getCookies();
		if (cklist != null && cklist.length > 0)
		{
			for(Cookie c:cklist)
			{
				if (c.getName().equals("name"))
				{
					operator = java.net.URLDecoder.decode(c.getValue(),"UTF-8");
					message += "<tr><td>: </td>";
					message += "<td>" + operator + "</td></tr>";
				}
				
				if (c.getName().equals("type"))
				{
					operatorType = java.net.URLDecoder.decode(c.getValue(),"UTF-8");
					message += "<tr><td>Ա: </td>";
					message += "<td>" + operatorType + "</td></tr>";
				}
				
			}
		}
		
		// ȡʵ·
		String realPath = this.getServletContext().getRealPath("index.jsp");
		int end = realPath.lastIndexOf("/");
		realPath = realPath.substring(0, end+1);
						
		String folder = realPath + "LogData";
		
		// ȡ־ʾʱ
		List<String> fileList = FileUtil.getAllFiles(folder);
		for (int i = 1; i <= fileList.size(); i++)
		{
			Log aread = FileUtil.readLog(folder + "/" + fileList.get(i-1));
			
			message += "<tr><td>¼" + i + ":</td>";
			message += "<td>"+ aread.getName() + "/" + aread.getDepartment() + "/" + aread.getPosition() + "/" + aread.getAccount() + "/" + aread.getOperation() + "/" + aread.getOpdetail() + "</td></tr>";
		}		
		
		
		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.println("<tr><td colspan=\"2\">///˻//ϸ</td></tr>");
		out.println(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 log");
			int i = 1;
			while (rs.next())
			{
				out.println("<tr><td>¼" + i + ":</td>");
				out.println("<td>" + rs.getInt("id") + "/" + rs.getString("name") + "/" + rs.getString("number") + "/" + rs.getString("department") + "/" + rs.getString("position") + "/" + rs.getString("account") + "/" + rs.getString("operation") + "/" + rs.getString("opdetail") + "</td></tr>");
				i++;
			}  
		} 
		catch (SQLException e) 
		{
		   // TODO Auto-generated catch block
			out.println("SQLException"+ e.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();
	}