You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jon Yeargers <jo...@bme.ogi.edu> on 2006/09/11 17:30:08 UTC
filter or valve to trap successful login?
Im working with a JNDI realm to control access to a site. I need to be
able to 'trap' a successful login to any one of the pages in the site so
that I can create a session bean with login information. Is it possible
to tie a filter or valve to the login process and get the information
*before* the user is directed to the protected page?
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: filter or valve to trap successful login?
Posted by David Delbecq <de...@oma.be>.
Put a filter on your application, in this filter, check if there is
currently a principal, if yes, check if there is already your bean in
the session. If not, create it. Then forward to the next of filter chain.
As you are in a filter, you will be notified before the servelt / JSP
requested by user is served.
Jon Yeargers a écrit :
> Im working with a JNDI realm to control access to a site. I need to be
> able to 'trap' a successful login to any one of the pages in the site
> so that I can create a session bean with login information. Is it
> possible to tie a filter or valve to the login process and get the
> information *before* the user is directed to the protected page?
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org