How can I call the get method of a servlet automatically, when a *different* HTML page is loaded?
To use an image, just use a tag like:
<img src="/servlet/MySpyWareServlet" />
However, the Servlets 2.3 specification (i.e. the current one) has added a new feature which you could use. It allows you to define Servlet Filters--which provide a "controller-like" functionality to your web application. With a filter, you can intercept and pre-process requests and/or intercept and post-process responses to any web content on your server (i.e. Servlets, JSP's, HTML, images, CGI's, SSI's, etc.). You can even refuse requests and responses. Since it's all done on the web server, client-side configuration cannot be used to defeat this mechanism. This is the functionality you want.
[Another poster suggests using an IFRAME]