httplib or urllib2 tomcat username and password

M

Michael Oliver

I am trying to write a Python client to access a Tomcat servlet using Tomcat
Realm authentication with no success.



I can use the httplib to connect to localhost port 8080 ok and post and get
and all that is fine, but when I try to set username and password and access
a protected part of tomcat it fails with an Unauthorized.



Does anyone have an example of connecting to Tomcat using the Tomcat Realm
(.i.e. tomcat-users.xml) authentication?

I have also tried urllib2 and the example in the header comments still gives
me a HTTP Error 401: Unauthorized when I try to open
http://localhost:8080/slide/





Thanks.


Highly Cohesive and Loosely Coupled

Mike Oliver
CTO Alarius Systems LLC
6800 E. Lake Mead Blvd
Apt 1096
Las Vegas, NV 89156
(e-mail address removed)
http://www.alariussystems.com/ tel:
fax:
mobile: (702)953-8949
(702)974-0341
(518)378-6154

Add me to your address book... Want a signature like this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top