How to change Cookie Processor to LegacyCookieProcessor in tomcat 8

Sachin Sharma picture Sachin Sharma · Aug 1, 2016 · Viewed 26.5k times · Source

My code is working on tomcat 8 version 8.0.33 but on 8.5.4 i get : An invalid domain [.mydomain] was specified for this cookie.

I have found that Rfc6265CookieProcessor is introduced in tomcat 8 latest versions.

It says on official doc that this can be reverted to LegacyCookieProcessor in context.xml but i don't know how.

Please let me know how to do this.

Thanks

Answer

linzkl picture linzkl · Aug 1, 2016

You can try in context.xml

<CookieProcessor className="org.apache.tomcat.util.http.LegacyCookieProcessor" />

reference: https://tomcat.apache.org/tomcat-8.0-doc/config/cookie-processor.html