admin管理员组

文章数量:1278855

I am getting some warning messages when running my project on Liberty, specifically in Chrome.

[WARNING ] Detected JSESSIONID with invalid length; expected length of 23, found 28, setting: BD14EBEEDBE53803FAE565131A03 to null.

This is because Liberty is generating a JSESSIONID of length 28, but the Liberty profile defaults the httpSession property idLength to 23. If I set

<httpSession idLength="28" />

in the Liberty server.xml I do not get these warning messages in the log. However, I would like to solve this without altering the server.xml.

Is it possible to change how the JSESSIONID is generated to default to length of 23? Or perhaps this is a poor approach?

I am getting some warning messages when running my project on Liberty, specifically in Chrome.

[WARNING ] Detected JSESSIONID with invalid length; expected length of 23, found 28, setting: BD14EBEEDBE53803FAE565131A03 to null.

This is because Liberty is generating a JSESSIONID of length 28, but the Liberty profile defaults the httpSession property idLength to 23. If I set

<httpSession idLength="28" />

in the Liberty server.xml I do not get these warning messages in the log. However, I would like to solve this without altering the server.xml.

Is it possible to change how the JSESSIONID is generated to default to length of 23? Or perhaps this is a poor approach?

Share Improve this question asked Oct 22, 2014 at 16:21 whwrightwhwright 5613 gold badges7 silver badges21 bronze badges 1
  • There some mistype in the sentence - "This is because Liberty is generating a JSESSIONID of length 28, but the Liberty profile defaults the httpSession property idLength to 23". You meant different product at the begining. – Gas Commented Oct 22, 2014 at 17:36
Add a ment  | 

2 Answers 2

Reset to default 7

I got this error after upgrading my version of WebSphere to 8.5.5.8. What finally did the trick was to delete my browser cookies. I suspect what was happening is that the browser was using the old (longer) JSESSION cookies from the earlier version of WebSphere.

WebSphere by default creates JSESSIONID of 23 length. So in your case you must be having on the same host different application server or web container, which creates different session cookie. The best way to avoid these problems would be to change default cookie name for one of the products installed. Changing length to 28 will only solve message in the log, but you will get application errors instead, since Websphere will look for a sessions it doesnt have, and the other way around - the other app server, when will receive cookie generated by WebSphere won't find the session also.

Check this link: http://www-01.ibm./support/docview.wss?uid=swg21671600

本文标签: javascriptHow to change length of generated JSESSIONID with LibertyStack Overflow