Also, please break down your task into smaller tasks, and ask specific questions.
What part of the code do you need?
Do you need to know how to create a JavaBean?
Do you need the JSTL code to interact with a JavaBean?
If you search on your favorite search engine for
"Random Password Generation Java" , you'll see some sample code on how to generate a code at random.
To create a JavaBean you will need to create a class, with variables and getter and setter methods for those variable and a public constructor.
Inside the getter method add code to generate a random code.
Message was edited by:
appy77
In fact, I would like to set a 10 digi codes randomly (such as FH654CS081, MKO624VG9f) for user input when they register the forum account. This random code will be sent to the user's email. User have to input this code to a JSP web site. Also, the code which is inputed by user will be matched with the database. If user input success, the forum account will be activated.
By generating this 10 digi codes, I want to handle this generation by using java bean.
1) Any thing else i need to import ? (such as <% page import="java.......?")
2) Any functions can handle this task?
3) Any example can be my reference?
Thank you very much