servletsservlet-filtersservlet-listeners

email confirmation link should expire after particular time period in servlets?


Little bit confused on how to implement the expiry timeout to email confirmation link..

As i'm fresher can you please help me in what way can we implement?

When i browsed came through the concept listeners,sessions

what is the best approach to implement?


Solution

  • You can store the confirmation token in the db against the userid.

    Schedule a db job that will delete the token after specific time if the token is not used.