William Brogden said:
You will have to do some programming - look into the various
session "Listener" interfaces such as HttpSessionListener.
Bill
Ok Thanks, I did a little research, created a tag in the web.xml
<listener>
<listener-class>
ca.qc.toto.cop.SessionListener
</listener-class>
</listener>
And created a class
/*
* Created on Aug 5, 2004
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and
Comments
*/
package ca.qc.toto.cop;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
/**
* @author cf1926
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and
Comments
*/
public class SessionListener implements HttpSessionListener {
private static Map sessions = new HashMap();
/* (non-Javadoc)
* @see javax.servlet.http.HttpSessionListener#sessionCreated(javax.servlet.http.HttpSessionEvent)
*/
public void sessionCreated(HttpSessionEvent arg0) {
System.out.println("Nouvelle session");
sessions.put("Nouveau nom","");
System.out.println(arg0.getSession().getId());
}
/* (non-Javadoc)
* @see javax.servlet.http.HttpSessionListener#sessionDestroyed(javax.servlet.http.HttpSessionEvent)
*/
public void sessionDestroyed(HttpSessionEvent arg0) {
sessions.remove("Nouveau nom");
}
/**
* @return
*/
public static Map getSessions() {
return sessions;
}
/**
* @param map
*/
public static void setSessions(Map map) {
sessions = map;
}
}
But now I can seem to get the remote user login id .... any ideas.
Thanks!