Added a request-restart-wrapper and some convenient redirections.
[jsvc.git] / src / dolda / jsvc / j2ee / J2eeContext.java
index f253128..696e32b 100644 (file)
@@ -1,6 +1,7 @@
 package dolda.jsvc.j2ee;
 
 import dolda.jsvc.*;
+import dolda.jsvc.util.*;
 import javax.servlet.*;
 import javax.servlet.http.*;
 
@@ -16,6 +17,10 @@ public class J2eeContext implements ServerContext {
     }
     
     public String rootpath() {
-       return(req.getContextPath());
+       return("/" + Misc.stripslashes(req.getContextPath(), true, true));
+    }
+    
+    public long starttime() {
+       return((Long)cfg.getServletContext().getAttribute("jsvc.starttime"));
     }
 }