SESSION ISSUE on withSession method

HI

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

https://www.playframework.com/documentation/2.5.x/ScalaSessionFlash

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 :

https://www.playframework.com/documentation/2.5.x/JavaSessionFlash

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?