title: How to convert UUID value to string
body: <p>I want to generate unique session id for my session. So i used UUID. Here what i did</p>
  
  <pre><code>if (session == null) {
  
      session = httpServletRequest.getSession(true);
      session.setAttribute("logedin", "0");
  
      if (!httpServletRequest.isRequestedSessionIdFromCookie()) {
  
          UUID sessionID = UUID.randomUUID();
  
          Cookie sessionCookie = new Cookie("JSESSIONID", "sessionID");  //problem
  
  }
  </code></pre>
  
  <p>The Cookie constructor accept two strings, how can i convert my UUID to string so it get the UUID value which is unique? 
  Thanks</p>