• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic