Ideally the browser fires an HTTP request and the container providers objects for HttpServletRequest and HttpServletResponse. The rest of the story in the mid of the is up to the vendors. As you seem new to
Java, you might want to go through something like Head First Java, and lately you can step into something like Head First Servlets and
JSP.