What exactly do you mean by overriding the cookie? Post any relevant code where you are dealing with cookies. Which exact version of WildFly are you on?
I am using version 9.0.0.FINAL
Here is the sample code
Cookie c= new Cookie("name", "value1");
Cookie b= new Cookie("name", "value2");
I am expecting 2 cookies in the browser Since the path is different. But i see only one cookie in the browser with value2.