tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shanmugampl <shanmuga...@adventnet.com>
Subject Re: Need Help in Session Management !!!
Date Mon, 01 Mar 2004 07:24:47 GMT
I think you can get the user name by getting the Principal object from 
request and then getting the name from it like

String userName = request.getUserPrincipal().getName();

-Shanmugam-

amit varshney wrote:

>I want to use  tomcat user authentication in my application. for that i am using JDBCRealm.I
have set the security constraint in the web.xml. So when  a request for the restricted page
comes a login page comes.
> But the problem is that it is submitting to the j_security_check and the textboxes are
named j_username and j_password respectivley.I want session mangemant in my application. For
that I need the login name of the person on my each page. How can I pass the username from
login page to my page. is it possible to maintain session using tomcat user authentication
or should i go for my own authentication and session management.
>
>Plz help me 
>Thanks in advance 
>Amit Varshney
>
>-------------------------------------------------
>Still single? Click here to find the perfect match.
>                                                                                
>http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?141
>
>  
>


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


Mime
View raw message