I have a nice function that I stole from some more experienced and better xpages programmer that clears sessionScope using CSJS:
function clearMap( map:Map ){ // Get iterator for the keys
var iterator = map.keySet().iterator(); // Remove all items
while( iterator.hasNext() ){
map.remove( iterator.next() );
}
Can this be modified to be successfully called from CSJS?