On Wed, Sep 3, 2008 at 11:06 AM, jorma kala <[EMAIL PROTECTED]> wrote: > Hi, > > I'm trying unsuccesfully to use the httplib library to execute servlets on a > local tomcat server. > > If I type the following http adress on my browser > http://localhost:8080/test/Serv1 the servlet works fine. > But if I try to access it with the following python code: > > conn = httplib.HTTPConnection("http://localhost:8080") > conn.request("GET", "/test/Serv1") > r1 = conn.getresponse() > > I get the following error: > > socket.gaierror: (11001, 'getaddrinfo failed') > > Do you know what I do wrong? > Thank you very much. > >
localhost is not resolved to 127.0.0.1 on your machine. Try changing it to http://127.0.0.1:8080 Regards Marco -- Marco Bizzarri http://notenotturne.blogspot.com/ http://iliveinpisa.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list