Hi,<br>
<br>
I'm trying unsuccesfully to use the httplib library to execute servlets on a local tomcat server.<br>
<br>
If I type the following http adress on my browser <a href="http://localhost:8080/test/Serv1">http://localhost:8080/test/Serv1</a> the servlet works fine.<br>
But if I try to access it with the following python code:<br>
<br>
conn = httplib.HTTPConnection("<a href="http://localhost:8080">http://localhost:8080</a>")<br>
conn.request("GET", "/test/Serv1")<br>
r1 = conn.getresponse()<br>
<br>
I get the following error: <br>
<br>
socket.gaierror: (11001, 'getaddrinfo failed')<br>
<br>
Do you know what I do wrong?<br>
Thank you very much.<br>
<br>
<br>
(The complete traceback is:<br>
<br>
Traceback (most recent call last):<br>
File "http1.py", line 130, in <module><br>
getTomcat1()<br>
File "http1.py", line 46, in getTomcat1<br>
conn.request("GET", "/test/Serv1")<br>
File "C:\Python25\lib\httplib.py", line 862, in request<br>
self._send_request(method, url, body, headers)<br>
File "C:\Python25\lib\httplib.py", line 885, in _send_request<br>
self.endheaders()<br>
File "C:\Python25\lib\httplib.py", line 856, in endheaders<br>
self._send_output()<br>
File "C:\Python25\lib\httplib.py", line 728, in _send_output<br>
self.send(msg)<br>
File "C:\Python25\lib\httplib.py", line 695, in send<br>
self.connect()<br>
File "C:\Python25\lib\httplib.py", line 663, in connect<br>
socket.SOCK_STREAM):<br>
socket.gaierror: (11001, 'getaddrinfo failed')<br>