jsp中设置http的P3P头实现跨域设置cookie

网上流行的字符串不太一致,于是去分析了一下sohu的P3P头,

在java中应设置如下:

HttpServletResponse response = (HttpServletResponse)res;
response.setHeader("P3P","CP=/"CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR/"");

 

HttpServletResponse response = (HttpServletResponse)res; response.setHeader("P3P","CP=/"CURa ADMa DEVa PSAo PSDo OUR BUS UNI PUR INT DEM STA PRE COM NAV OTC NOI DSP COR/"");

你可能感兴趣的:(网络)