//去本地取cookie
String result ="";
Cookie[] ce = request.getCookies();
for(int i=0;i<ce.length;i++) {
Cookie c = ce[i];
if(ObjectHelper.isNotEmpty(c)) {
if(c.getName().equals("ipLoc-djd")) {
result = c.getValue();
}
}
}
//如果cookie取出来的值是""
if("".equals(result)) {
result = "4-0-0-0";
}
获得Cookie,特此记录!