| Author |
Best practice for Protocol switching and loss of HttpSession
|
russell stoneyroyd
Greenhorn
Joined: Sep 12, 2006
Posts: 9
|
|
I have a problem which is quite common that adding items to a shopping cart is done over http. However when entering credit card form etc this is done over https. The results from this are posted to a struts action which gets a handle on the HttpSession object which is empty as the protocol has changed to https. What is the best way to implement protocol switching and session handling. I seem to find lots of solutions but they seem a little hacky. I'm sure many people have seen this issue before. But not sure what the best solution for this is. Thanks
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
Most real world sites store their carts in something more persistent than a JSP session; like a database, tracked with a cookie. Doing so, allows your users to shop, close their browser, come back another day and shop some more before checking out.
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: Best practice for Protocol switching and loss of HttpSession
|
|
|