Questions on Session Information in Spring MVC Application ?

1. How session will be stored in the server in spring mvc application ?

2. What are the different ways to store session in spring mvc application ?

3. Which approach would be efficient (client side or server side) ?

4. How to list all the sessions created in the server ?

5. How to invalidate a particular session which is active in the server - session id is available ?
Software ProgrammerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mccarlIT Business Systems Analyst / Software DeveloperCommented:
1, 2, 3.  Sessions are managed by the servlet container not by Spring so it depends on what you are using.
4, 5.   In a general sense, the only visibility of sessions that you have is via events received with a HttpSessionListener. You would have to track the sessions as they are created/destroyed and you can then use HttpSession.invalidate()
0
Ayomide AkinrotoyeCommented:
1. Session is stored on the server
2. In spring mvc application, depending on the kind of configuration you are using, You can use the @SessionAttribute annotation of spring or set the session attribute using Spring's HttpSession.setAttribute() method
3. Depending on the kind of application you are developing. It is usually smarter to use server side session management
4. As previiously stated, you can use HttpSessionListener of spring
5. To invalidate a session, you use the HttpSesssion.invalidate() method
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Software ProgrammerAuthor Commented:
i went through the code https://www.experts-exchange.com/questions/29087339/Retrieve-and-Invalidate-Session-using-session-id.html however we retrieve only one session in the code. i want to retrieve all the session. am i missing anything?
0
rrzCommented:
however we retrieve only one session in the code. i want to retrieve all the session.
 
I don't understand what you saying here. All the active sessions were held in the Hashtable. The test JSP, in my code, demonstrates how to access them.  
Please tell us what exactly you are trying to accomplish?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Software ProgrammerAuthor Commented:
Thanks a lot and now i understand..We can resolve this...No issues..It has been resolved.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.