Answer the question
In order to leave comments, you need to log in
Java: new browser -> new session?
Hello,
I can’t even “google” something ...
How can I make a new session be generated for each individual browser?
For example, I went through firefox to a specific address, got a SESSION_ID.
Then I want to go to the same address from chrome and get a new SESSION_ID, unfortunately I get the same one.
Thank you!
Answer the question
In order to leave comments, you need to log in
Most likely, the settings of your application server are to blame for everything.
What do you have?
Most likely the eyes that want to sleep are to blame.
@GET
@Path("/auth")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public Response authorisation()
{
if (kasSessionId == null) {
log.info("KAS_SESSION_ID_FOR_Authenticate: {}", kasSessionId); //null
getAuthenticate();
log.info("KAS_SESSION_ID_AFTER_Authenticate: {}", kasSessionId); //session_id
request.getSession().setAttribute("KAS_SESSION_ID", kasSessionId);
}
else {
log.info("KAS_SESSION_ID: {}", kasSessionId);
}
return Response.ok().build();
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question