I am running Tomcat 4.0 with form-based authentication.  I would like to add some 
user-specific variables into the session as soon as the user logs in (that is, as soon 
as the user logs in, I want to get the username from the form, use it to query my DB, 
put some results into the user's session, and have the user continue on to the page he 
originally requested.)

I have tried a number of solutions that don't work:

1) I've tried having the login form's action send the info to a servlet that does the 
processing and then forwards the request to "j_security_check", but that solution only 
works in 3.2 and not in 4.0

2) I have attached an HttpSessionListener, but since the session is created before the 
user actually logs in, my listener does not yet have the username and cannot complete 
the preprocessing.

Is there a way for me to execute something right AFTER a user authenticates?

Thanks,
Jon

Reply via email to