Via tomcat - there isn't a hook. The best (and most portable way) you can do this is to write a filter which checks for the attribute in the session vs the remoteUser value. For example:

doFilter(...) {
  if (null!=request.getRemoteUser() &&
        null==request.getSession().getAttribute("cowbell")) {
    myCodeWhichInitializesSessionOnLogin();
  }
  chain.doFilter(request, response);
}

-Tim

Amleto Di Salle wrote:

Hi all,
I have used the container (Tomcat) managed security, but after the
authentication I would like to set an object inside the session. How can
I do?
I have noticed that Tomcat creates a session if the user accesses to a
protected resource, so i cannot use the HttpSessionListener.


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

Reply via email to