hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From miles_pa...@us.ibm.com
Subject HttpServletRequest getRemoteUser() returns 'null'
Date Fri, 29 Sep 2006 19:55:21 GMT
Hi, 

using this in my client to set authorization.....

client = new HttpClient(
        new MultiThreadedHttpConnectionManager());
 
client.getHttpConnectionManager().getParams().
        setConnectionTimeout(30000);
 
client.getState().setCredentials(
        new AuthScope(null, -1),
        new UsernamePasswordCredentials("principal", "password"));

post.setDoAuthentication(true);


trying to retrieve in my servlet using....

setRemoteUser(httpRequest.getRemoteUser()); //always returns null

but httpRequest.getRemoteUser() always returns null.

Can anyone give me some things to try.  I can get it to work if I 
specficly set the "Authorization" httpRequest header and use httpRequest
.getHeader(AUTHORIZATION_HEADER_NAME) in the servlet but I would like to 
understand why setting the Credentials on the client doesn't work with 
getRemoteUser() in my servlet., 

thanks,
miles


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message