Reputation: 13
Environment - openjdk 1.7 - tomcat 7.0.55 with native connector - apache 2.4.10 with mod-jk 1.2.40
question. why tomcat using JSESSIONID set by client request value? is not regenerate?
is this java spec?
thanks.
Upvotes: 1
Views: 1129
Reputation: 724
I don't think it is in Java spec, I would think of it as of some kind of optimization: re-using session id in general reduces number of generated ids and though possible collisions.
However tomcat will do that only for sesionids stored in cookies (for security purposes See http://java.dzone.com/tips/turning-session-fixation for details).
To actually locate a place where tomcat 7 does this see: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.tomcat/tomcat-catalina/7.0.55/org/apache/catalina/connector/Request.java#2942
Upvotes: 1