Samiksha
Samiksha

Reputation: 1

How to generate an autonumber using jsp?

I want code in jsp or javascript which will generate numbers serially and automatically when ever registered by the user.

Upvotes: 0

Views: 1291

Answers (2)

100rabh
100rabh

Reputation: 6186

Samiksha, I think you are looking for UUID .A UUID represents a 128-bit value.

Read this post to generate Unique Ids.

Directly use it as:

UUID uniqueId = UUID.randomUUID();

Good Luck

Upvotes: 0

Harry Joy
Harry Joy

Reputation: 59670

If you are saving user in db then set your ID column autoIncreament no need to code for that.

Upvotes: 1

Related Questions