I recently upgraded a project to Java 8, targeting Tomcat 9. It relies heavily on cookies that use commas and possibly spaces in the value so I need to use LegacyCookieProcessor because the cookies aren't RFC 6265 compliant. The only two ways I can find on how to do this require Spring Boot or editing context.xml in Tomcat. This project isn't using Spring Boot so the first one isn't an option, and I'd really rather not break portability by requiring context.xml to be changed wherever it is deployed.
Is it possible to configure this in Java config or web.xml (or any other way)?