An invalid domain [.xxx.com] was specified for this cookie异常解决
在项目中需要向浏览器写cookie,使用的是tomcat8.5,在写cookie的时候设置了一级域名 如: .xxx.com , 但是在写cookie的时候,抛出了异常: An invalid domain [.xxx.com] was specified for this cookie 经查这种域名设置是cookie 版本0的遗留格式 在tomcat8.5上是使用org.apache.tomcat.util.http.Rfc6265CookieProcessor The standard implementation of CookieProcessor is org.apache.tomcat.util.http.Rfc6265CookieProcessor. This cookie processor is based on RFC6265 with the following changes to support better interoperability: Values 0x80 to 0xFF are permitted in cookie-octet to support the use of UTF-8 in cookie values as used by HTML 5. For cookies without a value, the '=' is not