> From: André Warnier [mailto:a...@ice-sa.com] > Subject: Re: of the different methods to get a user-id > > > I would expect > > request.getRemoteUser() == request.getUserPrincipal().getName() > > But there no literature which says that must be so. > > And the reality shows it isn't. > So somehow there must be two distinct underlying "thingies" in Tomcat > where the two different answers are coming from.
As Pid surmised, it's not Tomcat that is giving you different answers. Here's Tomcat's implementation of HttpServletRequest.getRemoteUser(): public String getRemoteUser() { if (userPrincipal != null) { return (userPrincipal.getName()); } else { return (null); } } [Aside: Don't know why people think return statements need parentheses; maybe they get paid for programming based on the number of characters used.] - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org