tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnson, David" <d.john...@Cranfield.ac.uk>
Subject RE: getRemoteUser()
Date Tue, 12 Aug 2003 15:08:05 GMT
Cool, that worked just fine.

Many Thanks,
Dave

> -----Original Message-----
> From: Jacob Kjome [mailto:hoju@visi.com] 
> Sent: Tuesday, August 12, 2003 4:04 PM
> To: Tomcat Users List
> Subject: Re: getRemoteUser()
> 
> 
> 
> Add the following to jk2.properties....
> 
> request.tomcatAuthentication=false
> 
> That tells Tomcat to take its authentication information from 
> the jk or jk2 
> connector which gets it from Apache.
> 
> Jake
> 
> At 03:22 PM 8/12/2003 +0100, you wrote:
> >I'm having some difficulty making the getRemoteUser() method 
> work. It's
> >possible I have missed the point of this method, but I'll 
> explain what
> >I'm trying to do anyway.
> >
> >I'm using mod_jk to map the url /lemons to a servlet which 
> is running on
> >Tomcat 1.4.27. I've got mod_jk set up okay and the mapping 
> works fine:
> >
> >JkMount /lemons ajp13
> >
> >I have then set up a Limit directive in my apache 
> configuration for the
> >url, thus:
> >
> ><Location /lemons>
> >   <Limit GET PUT POST>
> >     require user dave
> >   </Limit>
> ></Location>
> >
> >This works as expected. If I go to this url I am prompted 
> for a username
> >and password. If I enter dave and the correct password then 
> the request
> >is passed through to my servlet. If I enter an incorrect username and
> >password I get our server's authentication/authorization 
> failed page and
> >it doesn't get anywhere near the servlet.
> >
> >Within my servlet I then want to use getRemoteUser() method of the
> >HttpServletRequest object to obtain the username which was supplied.
> >Whenever I try this though, it always returns null. The request does
> >contain an authorization header, but I can't seem to get a 
> username out
> >of it.
> >
> >Any ideas please? (If I need to RTFM, please point me in the right
> >direction.)
> >
> >Thanks, Dave
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 

Mime
View raw message