apache-tomcat-8.5.61
java.lang.IllegalArgumentException:
为此cookie指定的域[.grepay.com]无效
SSM项目使用apache-tomcat-8.5.61启动报错 【java.lang.IllegalArgumentException: 为此cookie指定的域[.grepay.com]无效】,是因为tomcat-8.5.61更换默认的CookieProcessor实现为Rfc6265CookieProcessor,之前的实现为LegacyCookieProcessor。Rfc6265CookieProcessor 基于RFC6265,而LegacyCookieProcessor基于RFC6265、RFC2109、RFC2616。
解决方法:
修改apache-tomcat-8.5.61>conf>context.xml
<Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<!--增加一行-->
<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />
</Context>