public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		response.setContentType("text/html;charset=UTF-8");
		response.setCharacterEncoding("UTF-8");
		PrintWriter out = response.getWriter();
		out.print("本网站有以下书籍: <br/> ");
		Map<String, Book> map = DB.getMap();
		for(Map.Entry<String, Book> entry : map.entrySet()){
			Book book = entry.getValue();
			out.print("<a href='/myday07/servlet/CookieDemo03?id="+ entry.getKey() +"'>"+ book.getName() +"<a/><br/>");
		}
		//request.getRequestDispatcher("").forward(request, response);
		
		out.print("你曾经浏览过一下书籍: <br/>");
		Cookie cookie = null;
		Cookie cookies[] = request.getCookies();
		for(int i = 0; cookies!=null && i < cookies.length; i++){
			System.out.println("sdfesfesfsefsef" + cookies[0]);
			if(cookies[i].getName().equals("bookHistroy")){
				System.out.println("sdfesfesfsefsef2" + cookies[i]);
				cookie = cookies[i];
			}
		} 
		if(cookie != null){			
			String bookHistroy = cookie.getValue();
			String ids[] = bookHistroy.split("\\_");
			for(String id : ids){
				Book book = (Book) DB.getMap().get(id);
				
				out.print(book.getName() + "<br/>");
			}
		}		

	}