There are two controllers involved (two POJOs).
the first connection, for steps 1,2 + 3 - one object on the server. as part of (2), a unique code (the UUID mentioned in the comments) is generated and stored in the database.
the second connection, when the user clicks on the link, switches to another controller (another POJO, which may be the same class or may be a different class, depending on your implementation). which reads the UUID from the link, goes to the database, finds the email associated with the UUID, and marks the email as confirmed.
update I'm struggling to understand what you are missing, but when the user clicks on the link in the letter, the operating system opens a web browser. The web browser establishes a connection to the server. the server receives an HTTP GET request with the UUID in the URL and passes the UUID to the POJO.
several terms: the process of processing an incoming request in a web server is usually called "routing", and the general template used to structure the code called "MVC". the exact details will depend on the application structure used. for Java code on servlets, there is a mapping of URLs to servlets (servlets are Java code that implements a certain interface), the infrastructure can provide a servlet that ultimately causes you to call POJO, or you can write a servlet yourself, and in this case it will be your POJO, although in this case it is the wrong word, because it implements a certain interface) in the web.xml file.
also, I think the client web browser uses TCP to establish a connection over the network (it is almost always over IP because you use the Internet). In addition, the client "speaks" the message in HTTP. all of these different layers are described in the osi-level 7 network model.
there is a huge amount of detail at so many levels. hope you get started.
see also http://www.quora.com/What-happens-when-you-type-a-URL-into-your-browser
andrew cooke
source share