added Form, other minor changes
[org.ibex.xt.git] / src / org / ibex / xt / Servlet.java
index 0265e23..80545be 100644 (file)
@@ -15,29 +15,11 @@ import com.thoughtworks.xstream.*;
 import org.prevayler.*;
 import org.prevayler.implementation.snapshot.*;
 
-public class Servlet extends HttpServlet {
+public class Servlet extends Prevalence.PrevalentServlet {
 
     public static final JS METHOD = new JS.Method();
     private ServletScope servletscope = null;
     private String path;
-    private Prevayler prevayler;
-    private JS prevalent;
-    private ServletContext cx = null;
-
-    public void destroy() { try {
-        synchronized(this.getClass()) {
-            Prevayler privatePrevayler = prevayler;
-            if (prevayler == null) return;
-            prevayler = null;
-            Prevalence.destroy(cx, prevayler);
-        }
-    } catch (Exception e) { e.printStackTrace(); } }
-
-    public void init(ServletConfig sc) throws ServletException {
-        cx = sc.getServletContext();
-        prevayler = Prevalence.getPrevayler(cx);
-        prevalent = (JS)prevayler.prevalentSystem();
-    }
 
     public void doPost(HttpServletRequest request, HttpServletResponse response) throws IOException { doGet(request, response); }
     public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {