title: Tomcat/spring session management for anonymous user
body: <p>I have next use case:</p>
  
  <p>We have webstore where user can select some goods and then buy them. He can add goods to his cart before login to application. All of this items must be stored in his session. When user click "pay" button we will ask his credentials/card/etc.</p>
  
  <p>My problem: When I login before add items to cart all works correctly. But when I try to add items to cart as anonymous user, items are not storing. I always receive different JSESSIONID after refreshing each page as anonymous user.</p>
  
  <p>I decide create simple application which illustrate my problem. I think it can't be fixed without my sources.</p>
  
  <p>Here is my application:</p>
  
  <p><a href="https://github.com/AlexTestAccount/simple_test" rel="nofollow">https://github.com/AlexTestAccount/simple_test</a></p>
  
  <p>It very simple. It contais only one controler and session bean where I try save something.</p>
  
  <p>For run it you need gradle, tomcat and define enviropment variable CATALINA_HOME,
  than you can use:</p>
  
  <p>gradle deploy</p>
  
  <p>p.s. Sorry for my english</p>