1 package dolda.jsvc.j2ee;
4 import dolda.jsvc.util.*;
5 import javax.servlet.*;
9 public abstract class J2eeContext implements ServerContext {
10 private final ServletConfig sc;
11 private final long ctime;
12 protected final Properties sysconfig, libconfig;
14 protected J2eeContext(ServletConfig sc) {
16 this.ctime = System.currentTimeMillis();
17 sysconfig = new Properties();
18 libconfig = new Properties();
21 static J2eeContext create(ServletConfig sc) {
22 if(TomcatContext.tomcatp(sc))
23 return(new TomcatContext(sc));
24 return(new StandardContext(sc));
27 public long starttime() {
31 public String sysconfig(String key, String def) {
32 return(sysconfig.getProperty(key, def));
35 public String libconfig(String key, String def) {
36 return(libconfig.getProperty(key, def));
39 void loadconfig(InputStream in) throws IOException {
43 public ServletConfig j2eeconfig() {