You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Dave <ja...@yahoo.com> on 2006/03/28 10:37:20 UTC

How to populate session after authenticate

I am using JBoss. The servlet Form authentication is nice, but I need something more flexible.
   
  Users are allowed to login on any unprotected page and stay in the same page after lgoin.  I have database table to store username and password.
   
  After verifying username and password, what information needs to put into session(or other data structure) so that:
      HttpServletRequest.getRemoteUser() will return the remote user.
   
  Thanks!

		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

Re: How to populate session after authenticate

Posted by Nic Daniau <ni...@googlemail.com>.
I use request.getUserPrincipal().getName() to get the username, does it work
for you?

Never quite understood what this getRemoteUser method was... if someone
knows, I'm interested!

On 28/03/06, Dave <ja...@yahoo.com> wrote:
>
> I am using JBoss. The servlet Form authentication is nice, but I need
> something more flexible.
>
>   Users are allowed to login on any unprotected page and stay in the same
> page after lgoin.  I have database table to store username and password.
>
>   After verifying username and password, what information needs to put
> into session(or other data structure) so that:
>       HttpServletRequest.getRemoteUser() will return the remote user.
>
>   Thanks!
>
>
> ---------------------------------
> Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+
> countries) for 2¢/min or less.
>