+ 6
Session in RESTful web service.
Does anyone know how to maintain session in Java RESTful web service? I searched on Google but didn't find proper solution.
4 Antworten
+ 6
AJ #Level 20 End Day You don't... or at least you shouldn't. RESTful services should never maintain session information on any server. The very nature of RESTful services is to allow each client call to run in isolation from any previous call. Access to a resource should be self contained within the individual request.
Try searching on RESTful statelessness. That might provide more links on this architecture.
Here is a link that might give you additional context.
----
https://en.wikipedia.org/wiki/Representational_state_transfer#Statelessness
----
https://www.infoq.com/articles/rest-introduction/
NOTE: Scroll down to the section titled:
"Communicate statelessly"
----
https://stackoverflow.com/questions/3105296/if-rest-applications-are-supposed-to-be-stateless-how-do-you-manage-sessions
NOTE: There are several good answers in this thread.
----
+ 1
David Carroll Thanks. I found the same answer on stackoverflow. But I will see shared link once.
0
David Carroll Do you know?
0
ekhlas Mohamed Abdallah Mohamed did you just copy David Carroll 's answer?