Spring / Web services
REST services being stateless, can we make it stateful?
According to stackoverflow, the statelessness of REST is designed to ensure applications scale well. You can add state, but it is at a trade-off in scalability.
We can make it stateful by applying session management technique such as,
- Hidden form field,
- URL Rewriting,
- and HttpSession.
One of the common scenario to add state to REST is for authentication. Once a secure connection is established, a secure cookie can be sent to the client. This cookie is then added by the client to all requests for the session. The server maintains state and then loads that state in with every request based on the cookie.
More Related questions...