日期:2014-05-20 浏览次数:20680 次
<%@ page contentType="text/html;charset=UTF-8" language="java" %> <html> <head><title>Simple jsp page</title></head> <body> <% Cookie[ cookies = request.getCookies(); %> <h1 align="center"> CookieePage </h1> <p> Welcome to study Cookie!!! </p> <p> <% if(cookies!=null&&cookies.length>0){ for(Cookie co:cookies) { %> name:<%= co.getName() %><br/> value:<%= co.getValue() %> <% } }else{ out.println("cookies为空"); } %> </p> </body> </html>