package org.ibex.xt;
import java.io.*;
-import java.net.*;
-import java.util.*;
-import java.util.regex.*;
import javax.servlet.*;
import javax.servlet.http.*;
-import org.ibex.util.*;
-import org.ibex.util.Collections;
import org.ibex.js.*;
import org.prevayler.*;
JSScope scope = (JSScope)rq.getSession().getAttribute("scope");
if (scope == null) {
- System.out.println("creating new scope");
try {
- scope = new JSScope(null);
- scope.put("prevalent", prevalent);
+ scope = new JSScope(null) {
+ { super.put("prevalent", prevalent); }
+
+ public void put(String k, String v) throws JSExn {
+ if (k != null && k.equals("prevalent")) throw new JSExn(
+ "can not replace key prevalent");
+ super.put(k, v);
+ }
+ };
} catch (JSExn e) {
e.printStackTrace();
throw new IOException("unexpected JSExn");