how to generate unique filenames??
843841Apr 15 2003 — edited Apr 16 2003i need to be able to generate unique files from a servlet..
my initial instinct was to use the seesion id as part of the filename, however as this file will be embedded in the responding html, this is not safe, as the user will only have to look at the html source to view a session id value.
i am now considering to use the date/time of the creation of a session as the unique identifier for the file, however this will not work if two sessions can be created at the same time.
my question thefore is if no two sessions can have the same date and time?
if not.. can anyone give me an idea as how to produce unique filenames?