Il 26/11/07, [EMAIL PROTECTED]<[EMAIL PROTECTED]> ha scritto: > Salve a tutti. Il mio problema è quello di poter lanciare una Servlet > remota da un sorgente python (utilizzando httplib) avendo le seguenti > informazioni : > 1) URL servlet > 2) parametri > > Qualcuno può suggerirmi come fare?
params = urllib.urlencode({'nome':nome, 'cognome':cognome, 'password':password}) h = httplib.HTTP(SERVER_HOSTNAME, SERVER_PORT) h.putrequest("POST", SERVER_URL) h.putheader("Content-type", "application/x-www-form-urlencoded") h.putheader("Content-length", "%d" % len(params)) h.putheader("Accept", 'text/plain') h.putheader("Accept", 'text/html') h.putheader("Accept", 'application/xml') h.putheader("Accept", 'text/xml') h.putheader("Host", SERVER_HOSTNAME) h.endheaders() h.send(params) reply, msg, hdrs = h.getreply() data = h.getfile().read() ciao, stefano -- --------------------------------------------------------------- Per favore non mandate allegati in Word o PowerPoint. Si veda http://www.fsf.org/philosophy/no-word-attachments.html --------------------------------------------------------------- Stefano Sasso [EMAIL PROTECTED] Linux User #330315 http://www.gnustile.net/ _______________________________________________ Python mailing list Python@lists.python.it http://lists.python.it/mailman/listinfo/python