使用HttpServletRequest读取Cookies
在Java的Servlet中,可以通过HttpServletRequest对象的getCookies()方法获取客户端发送的Cookies,这个方法返回一个Cookie数组,遍历这个数组可以访问每个Cookie的名称和值。