SESSION ISSUE on withSession method


I’m trying to use session stack with play framework ( version 2.5 ) as reported in official documentation

but i’ve a issue, in the framework there is not the suggested documentation method “withSession”

Ok(“Hello World!”).withSession( … );

i’ve tryed to use then

Ok(“Hello World!”).session().put(…)
Ok(“Hello World!”).session().get(…)

Methods but they seem to not working propely.

What my fault?

Any suggest?

I’ve just tryed with example reported in :

But i have the same issue, value are not stored in the session, and are returned as null

session(“Product” . “product 1”);

String product = session ( “Product” );

product is set as null value.

Any one have a suggest?

I’m still have the issue.
Nobody have a answer?

Thank you anyway,

I have fixed using play.cache layer .