Search code examples
javacookiestomcat8

How to change Cookie Processor to LegacyCookieProcessor in tomcat 8


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


Solution

  • 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