I have encountered problems with java.net.UnknownHostException errors with Apache+JServ. Attached is a servlet, inet_test.java, which you can compile and excecute both as a standalone application, as well as as a servlet. In my environment, when executed as an application, it works perfectly. When executed as a servlet (Apache 1.3.9 + JServ 1.1b2), it generates the aforementioned exception whenever calling InetAddress.getByName(). You'll want to rename or eliminate the server names after "localhost". On my system, those are all listed in /etc/hosts as aliases for the same machine. If you have time, please try it and let me know the results for your system, and what platform you used. I don't need to know the actual server names and/or IP addresses; just whether or not the servlet WORKED or not (the exception being generated is considered failure). --- Noel
Attachment:
inet_test.java
Description: Binary data