Skip to main content
Participant
October 19, 2007
Question

length/size of a JSESSIONID for DB storage

  • October 19, 2007
  • 2 replies
  • 1902 views
As a part of an audit logging feature in my app, I have to store the jsessionID whenever someone hits specific pages. I have been unable to find any documentation stating exactly what the length of a jsessionID is so I can appropriately size my database column.

Everything I've read simply states it's a random generated string per session, nothing about how many characters its maximum length could be.
    This topic has been closed for replies.

    2 replies

    Participating Frequently
    October 19, 2007
    I've gotten 20 chars exactly from 4 different clustered ColdFusion environments here at the office. I've been told it's variable length though, so you might as well make the column varchar[40] and hope that's enough.

    If it breaks someday, you can always extend it further.
    Participant
    October 19, 2007
    We had it as varchar(20) but we are often seeing jsessionIDs longer than 20. I've got one example here where it was 38 chars long. I increased it to varchar(40) but I wanted to find the exact spec on it's length to eliminate any future problems. Apparently finding such a length spec is harder than it should be.