Hi All, I am having a servlet page, in that I need to generate the number in sequence and again which needs to be unique. This number is like order number and I do not want them to be duplicated. Can any one suggest me how to proceed or Is there any site that has the help for this(like web counter). Looking forward for the reply.
It depends on what ever you want to do with it. You can set an attribute and increment it by listeneres...but the ideal is to put it on a database or in a file. Aleks
Joined: Apr 18, 2002
Hi Aleks, Thanks for the reply. As I am not allowed to use the database and at the same time if I keep the value in the file then I need to take other precaution that when one process reading the file I should not allow the other process to access the file till I increment the value in the file. Is there any way to do that, or can you suggest me some other option. Thanks in Advance, Vasu.
"Aleks", Your name still does not comply to the JavaRanch naming convention, described at http://www.javaranch.com/name.jsp. We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please edit your profile and select a new name which meets the requirements. Thanks. Dave