Well I think you are using Base 64 encoding here. I also used it in one of my projects to encode parameters but never used it with cookies. Try your program on a different
servlet container. If you still get the same behavior than I think this is the default behavior and you'll have to use some different encoding...