I have one but part of a broader NSF with many other tests. i need to isolate the code and better document it
Anyway, you have 2 classes: SessionListener & ApplicationListener (package com.ibm.xsp.application.events). You can implement one of them or both, like this:
public class SessionEvent implements SessionListener {
public void sessionCreated(ApplicationEx arg0, HttpSessionEvent sessionEvent) {
System.out.println("sessionCreated, "+sessionEvent.getSession().getId());
}
public void sessionDestroyed(ApplicationEx arg0, HttpSessionEvent sessionEvent) {
System.out.println("sessionDestroyed, "+sessionEvent.getSession().getId());
}
}
public class SessionEvent implements SessionListener {
public void sessionCreated(ApplicationEx arg0, HttpSessionEvent sessionEvent) {
System.out.println("sessionCreated, "+sessionEvent.getSession().getId());
}
public void sessionDestroyed(ApplicationEx arg0, HttpSessionEvent sessionEvent) {
System.out.println("sessionDestroyed, "+sessionEvent.getSession().getId());
}
}
public class SessionEvent implements SessionListener {</div>
public void sessionCreated(ApplicationEx arg0, HttpSessionEvent sessionEvent) {<br/>
System.out.println("sessionCreated, "+sessionEvent.getSession().getId());<br/>
}</div>
public void sessionDestroyed(ApplicationEx arg0, HttpSessionEvent sessionEvent) {<br/>
System.out.println("sessionDestroyed, "+sessionEvent.getSession().getId());<br/>
}<br/>
}<br/>
</div>
<p>
Then, the class as to be registered in a extension, using a file located in the META-INF directory of your java source directory:</p>
<p>
<img alt="" src="/main.nsf/xsp/.ibmmodres/persistence/DominoDoc-1CCD2-BodyR/dir_1308872949764.jpeg"></p>