Servlets come into the picture because the requested URL points to a servlet or JSP directly or indirectly. Depending on how the request is sent (POST or GET) the container calls the appropriate http method (doPost or doGet) that the servlet implements.
When you request a website, the hostname is converted to an IP address by the DNS. Then the request hops thru the internet using the gateway and reached the appropriate server.
In the home page there could be an embedded servlet, then the servlet is invoked and the response is generated. The response(html) is then sent back to the client ... this time a different path may be taken to reach the client.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com