Hi ramnna, welcome to javaranch
!
I can't give you the complete code but I can give you some hints. First of all in your database, there must be an additional column in the user table. The column will be a bit (or you can say boolean) column which will represent if the user's account is activated or not. When a user registers, his/her account will be deactivated (i.e. the column will have a value false or 0). You must also send an email to the user which should contain a link of this form
http://[Domain Name]/user/activate/[encrypted user-id]
You must also create a
servlet which maps to /user/activate/* which will do the work of activating the user's account. When the user clicks on the link in the email, he/she will be taken to that servlet which will decrypt the user-id, set the activated column's value to true (or 1). After that the activation servlet must redirect the user to his/her home page...
(edit: added welcome message)