Pregunta

I use FORM-based authentication method in Java JSP/Servlet app. I want to "do something" after a successful login. Is there any listener which help me to do it? I don't want to put any code at the beginning of each page.

¿Fue útil?

Solución

Generally, authentication being a cross-cutting concern, you would have extracted it to an authentication ServletFilter that is applied to all the servlets that need the user to be authenticated. If you have such a filter, this logic would go into that filter after successful authentication.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top