• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

shopping cart data lost after login

 
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, I am using spring mvc 3/4+, with spring security.

Before login, I added some data to the shoppign cart (with session annotated), and then login.
After login, shopping cart becomes enpty.
I think session id is changed, so data in cart is all gone.

With spring security, is there any way I can copy all data from shopping cart to new session before refresh ssession by spring security ?


Here is security-config.xml:

 
sam White
Ranch Hand
Posts: 229
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I 'd like to further explain the issue:
Before login, user added items to the shopping cart.
When user checkout, user decided to login first, but after login, all purchased items in the shopping cart is gone.

Here is my shoppingCartServiceIimpl java class:



This data lost may be caused by spring security changed the session .

Now, is there any way I can keep/find the session obj before user login, and copy the shopping cart data to the new session after user login?

Thank you for your help again
Sam
 
Why is the word "abbreviation" so long? And this ad is so short?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic