Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only Cookie JSESSIONID set from first Login request is not sent in subsequent requests?

I am not able to understand what's going on. On one of the env. of my webapp (written using ExtJS 4.0) - I see the login request successfully completes but subsequent request fails with 401.

When digged a bit more I found in Browser(F12) that 1st request's response header has JSESSIONID, which is set as a cookie, but 2nd request doesn't send it in its request headers. That's why 2nd request creates a new session and returns a new JSESSIONID.

In the client code where request is sent,
Ext.Ajax.request({url:'', callback..}) - there is NO explicit setting of JSessionId or any cookie.

Strange part is NOT ALL cookie keys are missing, only JSESSIONID, that means cookies are not disabled and set by browser.

Why is the browser not sending JSESSIONID? I tried this in firefox/chrome both.

Also this is happening only in my local env., QA env. of the webapp is working fine.

like image 522
akjain Avatar asked May 15 '15 07:05

akjain


1 Answers

I figured it out myself.. this was the issue http://tomcat.apache.org/migration-7.html#Session_cookie_configuration

Thanks to all the people who spent time reading my question.

like image 131
akjain Avatar answered Oct 01 '22 04:10

akjain