tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <craig...@apache.org>
Subject Re: JDBC Realms
Date Fri, 28 Sep 2001 01:46:21 GMT


On Thu, 27 Sep 2001, Oleksandr Fedorenko wrote:

> Date: Thu, 27 Sep 2001 18:19:40 +0300
> From: Oleksandr Fedorenko <maint@intercollab.kiev.ua>
> Reply-To: tomcat-user@jakarta.apache.org, afedoren@yahoo.com
> To: tomcat-user@jakarta.apache.org
> Subject: Re: JDBC Realms
>
>
>
> Mark Muffett wrote:
>
> > In Tomcat v3.3 it is possible to get the name of the user logged into a JDBC
> > Realm using something like:
> >
> >     request.getSession().getAttribute("j_username");
> >
> > but this doesn't work in Tomcat v4.0.  Does anyone know what j_username has
> > become?
> >
>
> Use request.getRemoteUser()
>

This is the right answer.  The 3.3 approach of exposing this as a session
attribute is totally non-standard, and therefore not portable.

> >
> > Thanks for any help.
> >
> > Mark Muffett
>
>

Craig



Mime
View raw message