res.setContentType("text/html");
PrintWriter out = res.getWriter();
// ...Some introductory HTML...
// Get the client's hostname
String remoteHost = req.getRemoteHost();
// See if the client is allowed
if (! isHostAllowed(remoteHost)) {
out.println("Access <BLINK>denied</BLINK>"); // filter out the blink!
}
else {
out.println("Access granted");
// Display download links, etc...
}