I want to create a unique session identifier for my session. Therefore, I used the UUID. Here is what i did
if (session == null) { session = httpServletRequest.getSession(true); session.setAttribute("logedin", "0"); if (!httpServletRequest.isRequestedSessionIdFromCookie()) { UUID sessionID = UUID.randomUUID(); Cookie sessionCookie = new Cookie("JSESSIONID", "sessionID");
The cookie constructor accepts two strings, how can I convert my UUID to a string to get a unique UUID value? Thanks
Basit source share