Caldarale, Charles R wrote:
From: André Warnier [mailto:[EMAIL PROTECTED]
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: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to