You can create a bean that would store the user in the session after he
is authenticated. 

I hope you have login.jsp which would get the user id and password for
authentication. Once the user is authenticated there would be a
re-direction page (welcome-page in web.xml file).

If you are using struts then this welcome-page can be an action class
that would do a request.getUserPrincipal().getName() from the http
request and store it in a session bean. 

If you are not using Struts then you can call a servlet that would do
the same request.getUserPrincipal().getName() and store it in a session
bean 

Hari


-----Original Message-----
From: David Brown [mailto:[EMAIL PROTECTED]] 
Sent: Monday, December 02, 2002 3:08 PM
To: [EMAIL PROTECTED]
Subject: JDBCRealm/Form login get current user ?(hope Craig is
listening).


Hello tc-users and Craig McClanahan, i have been very successfull and
lucky 
developing protected webapps using form-based login and JDBCRealm for
the 
oracle database. WooHoo! i have searched the source JDBCRealm and
RealmBase 
and cannot come up any ideas on how to determine who is currently logged
in 
and using the "protected" webapp locations. the users, roles, and
user_roles 
tables are working perfectly. Anyone w/ ideas on how to do a so-called: 
getUser or getCurrentLogin programmatically? maybe there is some
server.xml 
config i could do. any and all ideas, suggestion, rants and raves
welcomed. 
thanx, david.

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to