Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSESSIONID suffixed with .undefined

I have a Spring Web MVC application running in Jboss AS 7.1. When I check the session id of the application (by looking at the session cookie using Firebug from Firefox), it has .undefined suffixed with it. For example,

Ur1bLe3UDdWJ9xm0ZDbMfZvJ.undefined

I worked out a sample servlet session program and checked the session id and it is the same. I would like to know why we have .undefined as part of session id? I think this will not have any impact on the application, but wanted to know why the session id is created like this. If anyone knows about this, please clarify.

like image 622
Chakravarthi Bharathi Avatar asked Nov 07 '12 09:11

Chakravarthi Bharathi


1 Answers

If I am not mistaken in JBOSS 7.1 the .undefined part is due to the instance-id not being configured in the standalone.xml file.

The following addition to the standalone.xml file would replace the .undefined with a configured text:

<subsystem xmlns="urn:jboss:domain:web:1.1" 
           default-virtual-server="default-host" 
           native="false" 
           instance-id="hostA">

There is also this discussion here: community.jboss.org

like image 162
timmi4sa Avatar answered Oct 18 '22 19:10

timmi4sa