如何使用 Liberty 更改生成的 JSESSIONID 的长度?

whw*_*ght 4 javascript session jsessionid websphere-liberty

在 Liberty 上运行我的项目时,特别是在 Chrome 中,我收到一些警告消息。

[WARNING ] Detected JSESSIONID with invalid length; expected length of 23, found 28, setting: BD14EBEEDBE53803FAE565131A03 to null.
Run Code Online (Sandbox Code Playgroud)

这是因为 Liberty 正在生成长度为 28 的 JSESSIONID,但 Liberty 配置文件将 httpSession 属性 idLength 默认为 23。如果我设置

<httpSession idLength="28" />
Run Code Online (Sandbox Code Playgroud)

在 Liberty server.xml 中,我没有在日志中收到这些警告消息。但是,我想在不更改 server.xml 的情况下解决这个问题。

是否可以将 JSESSIONID 的生成方式更改为默认长度 23?或者也许这是一个糟糕的方法?

小智 5

将 WebSphere 版本升级到 8.5.5.8 后,我收到此错误。最后的窍门是删除我的浏览器cookie。我怀疑发生的情况是浏览器正在使用早期版本的 WebSphere 中旧的(较长的)JSESSION cookie。