Cookies java.lang.IllegalArgumentException:Cookie值中存在无效字符[34]

Cookies java.lang.IllegalArgumentException:Cookie值中存在无效字符[34],cookies,user-roles,kie-workbench,tomcat8.5,Cookies,User Roles,Kie Workbench,Tomcat8.5,以下是我的tomcat用户文件的外观: <tomcat-users> <role rolename="admin"/> <role rolename="analyst"/> <role rolename="user"/> <role rolename="kie-server"/> <role rolename="developer"/> <role rolename="manager"/>

以下是我的tomcat用户文件的外观:

<tomcat-users>
  <role rolename="admin"/>
  <role rolename="analyst"/> 
  <role rolename="user"/>
  <role rolename="kie-server"/>
  <role rolename="developer"/>
  <role rolename="manager"/>

  <user username="w" password="w" roles="admin"/>
  <user username="k" password="k" roles="kie-server"/>  
  <user username="u" password="u" roles="user,developer,analyst"/>
</tomcat-users>

CookieProcessor是Tomcat 8.0.15中引入的一个新配置元素。 CookieProcessor元素允许在每个web应用程序中或在默认的conf/context.xml文件中进行不同的cookie解析配置

根据官方文件:

CookieProcessor的标准实现是:org.apache.tomcat.util.http.LegacyCookieProcessor。请注意,预计在未来的tomcat 8版本中,这将更改为org.apache.tomcat.util.http.Rfc6265CookieProcessor

以后

根据官方文件

CookieProcessor的标准实现是org.apache.tomcat.util.http.Rfc6265CookieProcessor

要解决此问题,请在conf/context.xml中的%CATALINA_HOME%位置添加这一行(在我的示例中为C:\apache-tomcat-8.5.20\conf\context.xml):

以下是添加后的情况:

<?xml version="1.0" encoding="UTF-8"?>

<Context reloadable="true">
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
    <Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory"/>
    <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />    
</Context>

WEB-INF/WEB.xml
${catalina.base}/conf/web.xml

也为tomcat9工作
<?xml version="1.0" encoding="UTF-8"?>

<Context reloadable="true">
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
    <Transaction factory="bitronix.tm.BitronixUserTransactionObjectFactory"/>
    <CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />    
</Context>