网络操作笔记
1. cookie相关操作
1). 设置cookie共享
Cookie cookie = new Cookie("pkId",sysUser.getPkId()+"");
cookie.setDomain("bsp.bioeh.com");
cookie.setPath("/bsp/");
getResponse().addCookie(cookie);
2). 删除cookeis
Cookie newCookie = new Cookie("pkId", null);
newCookie.setDomain(cookieDomain);
newCookie.setPath(cookiePath);
newCookie.setValue(null);
newCookie.setMaxAge(0);
getResponse().addCookie(newCookie);
注意,此处必须将cookie重新加入到response中