The moose likes Web Services and the fly likes Secure sockets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Secure sockets" Watch "Secure sockets" New topic

Secure sockets

Simon Good
Ranch Hand

Joined: Sep 19, 2002
Posts: 30
The web services tutorial states that:
If you are using sessions, once you switch to SSL you should never accept any further requests for that session that are non-SSL. For example, a shopping site might not use SSL until the checkout page, then it may switch to using SSL in order to accept your card number. After switching to SSL, you should stop listening to non-SSL requests for this session

If I needed to construct a website where the user is required to log in, add items to their shopping basket and then pay for their items, how would I implement this?
The idea would be that they could log in using https, do their shopping in a normal http way and then pay using https. Isn't this exactly the kind of thing the tutorial states I shouldn't be doing?
This might not be the best place for this posting but the question has arisen from reading the web services tutorial.
Lasse Koskela

Joined: Jan 23, 2002
Posts: 11962
The quote says "first HTTP, then HTTPS for checkout". You're saying "first HTTP, then HTTPS for checkout". I don't see any problem here -- the only difference is that the quote suggests staying in HTTPS mode once the customer has stored confidential information into the session using his cookie as the key to this information.

Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
I agree. Here's the link:
subject: Secure sockets
jQuery in Action, 3rd edition