Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7538601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:09:43+00:00 2026-05-30T07:09:43+00:00

With Play 1.0 we had the session.getId() method to retrieve a unique session identifier.

  • 0

With Play 1.0 we had the session.getId() method to retrieve a unique session identifier.

The id was handy to prefix keys in the global cache.

Where is Play 2.0 session.id equivalent ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:09:45+00:00Added an answer on May 30, 2026 at 7:09 am

    Since the session data is stored as cookies, there is no more session id with play 2.0. In fact there is no need for an identify token either, the session data is just passed along with every request leaving the server completely stateless.

    However, you may still need an id should you need to store per user data in the global cache.
    For this purpose, use the code below

    // Generate a unique id
    String uuid=session("uuid");
    if(uuid==null) {
        uuid=java.util.UUID.randomUUID().toString();
        session("uuid", uuid);
    }
    

    Session id? it sounds so Java EE anyways…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had developed a mobile page by asp.net to play mp4 video. I know
I've had lots of success in getting IE to play nice in the past,
I recently had a play around with Hadoop and was impressed with it's scheduling,
Hi i need to play a song from the itunes library. I had gone
How can I play two or more audio file in Android? I had created
I've never really had to play with classes but am looking to use php-ews
I had setup an app to play a video using the library suggested here
I really like Play and it adresses all the problems I had when develpoing
Hi has anyone had any experience using both Stripes and Play and can compare
I have had to set a fixed time out for a particular COM method

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.