In my application, I would like to send an email to the user who created a new account to confirm his email. As usual, there will be a URL to be clicked by the user in the mail. However, I couldn't figure out how the full URL of the web application is created.
Currently I can access to ServletContext
. Is there a way to construct full URL of the application through the ServletContext object and is this an elegant way?
In general, I would like to learn about the best practice which is used to create such confirmation mails (especially the URL preparation part).
Thanks in advance