Are the objects stored in the session scope server-side or client-side?

Asked 2 years ago, Updated 2 years ago, 89 views

I've had a year and a half of programming experience.
My senior asked me the following question last time.


"Is the object stored in the session scope server-side or client-side?"


I'm trying to find out if you're talking about Servlet session management, but I haven't been able to confirm the exact answer.I am also looking into HTTPsession.

If anyone understands, please let me know.

java jsp

2022-09-30 16:48

1 Answers

This question has been resolved with advice from someone else!


The saved object resides on the server side.


The server generates a unique string called the session ID and stores the object on the server in the form of association with the session ID.

The server then tells the client, "Your session ID is this.Please use this session ID for future communications."

The client communicates with the session ID provided by the server on the subsequent communication (request header).
The server uses the session ID from the client to resolve the association with previously saved information.


2022-09-30 16:48

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.