You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by 梁炳場 <pc...@gmail.com> on 2005/09/14 15:37:59 UTC

How to get user name after login

After implementation of JDBCRealm,
how to retrieve the username in Servlet after login?


Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to get user name after login

Posted by Mark Thomas <ma...@apache.org>.
梁炳場 wrote:
> After implementation of JDBCRealm,
> how to retrieve the username in Servlet after login?

getRemoteUser()


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to get user name after login

Posted by Sonja Löhr <so...@arcor.de>.
It is:
request.getUserPrincipal().getName();
To check for a special role, use:
request.isUserInRole("rolename");




Am Donnerstag, den 15.09.2005, 03:49 -0700 schrieb Caroline Jen:
> I think it is getRemoteUser();
> 
> --- ±ç¬±³õ <pc...@gmail.com> wrote:
> 
> > After implementation of JDBCRealm,
> > how to retrieve the username in Servlet after login?
> > 
> > 
> > Thanks
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > tomcat-user-help@jakarta.apache.org
> > 
> > 
> 
> 
> 
> 		
> __________________________________ 
> Yahoo! Mail - PC Magazine Editors' Choice 2005 
> http://mail.yahoo.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
-- 
Sonja Löhr <so...@arcor.de>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: How to get user name after login

Posted by Caroline Jen <ji...@yahoo.com>.
I think it is getRemoteUser();

--- ±ç¬±³õ <pc...@gmail.com> wrote:

> After implementation of JDBCRealm,
> how to retrieve the username in Servlet after login?
> 
> 
> Thanks
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tomcat-user-help@jakarta.apache.org
> 
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org