tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: HttpServletRequest.getUserPrincipal
Date Tue, 18 Nov 2008 09:15:19 GMT
Caldarale, Charles R wrote:
>> From: André Warnier []
>> Subject: Re: HttpServletRequest.getUserPrincipal
> Sorry for not answering sooner 
you are forgiven

- it's easier to do the source searching at home.
>> is getRemoteUser() merely a shortcut, under which
>> happens a getUserPrincipal.getName()
> At least in Tomcat, they're the same:
>     public String getRemoteUser() {
>         if (userPrincipal != null) {
>             return (userPrincipal.getName());
>         } else {
>             return (null);
>         }
>     }
> Can't speak for what goes on in other containers, or why the spec is somewhat ambiguous
in that area.
Thanks for clarifying this anyway for Tomcat.

As for the 1.5 Java specs, there are indeed a couple of black holes in 
the "Principal" area.  I tried to follow the links between doc pages in 
that respect, but could never get a clear description of what a 
"Principal" really looks like.  The only thing being said clearly is 
that "it" contains the authenticated user "id", or "name", and that "it" 
is null when the user is not authenticated.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message