java.util.Random random = new Random();
String sessionID = Long.toHexString(random.nextLong());

This will generate a 64 bit random number.

or you could use a Base64 encoder instead of using a hex string.

You might consider also adding the user's IP address into your table,
so that you can tie the sessionID to an IP address.  This is far from
un-spoof-able, but better than nothing, I suppose.
The IP address can also be unreliable when going through a NAT
appliance.

Jamie.

-----------------------
Search for analog and digital television broadcast antennas in your
area:
http://www.antennamap.com/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to