Session in RESTful web service. | SoloLearn: Learn to code for FREE!


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/3/2020 11:26:06 AM

AJ #L20 Soon

4 Answers

New Answer


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. ---- ---- NOTE: Scroll down to the section titled: "Communicate statelessly" ---- NOTE: There are several good answers in this thread. ----


David Carroll Thanks. I found the same answer on stackoverflow. But I will see shared link once.


David Carroll Do you know?


ekhlas Mohamed Abdallah Mohamed did you just copy David Carroll 's answer?