C
Chad Cunningham
Hi,
I'd like to have a bean populated with data on a user from a database,
then have that bean stored in the session context for easy access on
all of the JSP pages and servlets. The way I'm working this out
currently is to try and use a SessionListener to create the bean when
a session is created (authentication is done with realms in tomcat).
First, is this an appropriate way to handle this or is there a better
way?
Secondly, and I'm probably missing something simple here, but how do I
get ahold of the request object in my SessionListener so that I can
find out what username they logged in with and populate the bean?
Thanks!
I'd like to have a bean populated with data on a user from a database,
then have that bean stored in the session context for easy access on
all of the JSP pages and servlets. The way I'm working this out
currently is to try and use a SessionListener to create the bean when
a session is created (authentication is done with realms in tomcat).
First, is this an appropriate way to handle this or is there a better
way?
Secondly, and I'm probably missing something simple here, but how do I
get ahold of the request object in my SessionListener so that I can
find out what username they logged in with and populate the bean?
Thanks!