Hi, I am using Javawebserver2.0 for my servlets. I have to test my servlets like a real time on web in my system which is not having internet connection. For example, I have home page of my project with path http://localhost:8080/servlet/Index & it should get invoked after typing www.xyz.com. Is there any option to do this with Javawebserver? Thanks, Hare Rama
posted 14 years ago
If your system is not connected to the net, all you need is for the local name-to-ip-address mapping to map www.xyz.com to the localhost IP address 127.0.0.1. The easiest way to do this is to edit your hosts file (Unix/Linux /etc/hosts; Win95/98 c:\windows\hosts; WinNT c:\windows\system32\hosts (I think)) so that it contains a line like
On Windows you may have to reboot for this to take effect, but try it first ...