Implementing forgot password functionality in Java:
User clicks the forgot password link.
In the forgot password page, system prompts the user to enter the email address he/she has registered in to the system.
An email which contains a link to reset the password is sent to the given email address in step above.