-
- private static Properties readconfig(ServletConfig sc) {
- /* This only works on Tomcat now, but that's because I've no
- * idea how other J2EE servers work. I don't even know if they
- * _have_ any reasonable place to put configuration and
- * storage. */
- Properties cfg = new Properties();
- String basename = System.getProperty("catalina.base");
- if(basename != null) {
- File base = new File(basename);
- cfg.put("jsvc.storage", new File(new File(base, "work"), "jsvc").getPath());
- File cdir = new File(base, "conf");
- loadprops(cfg, new File(cdir, "jsvc.properties"));
- }
- return(cfg);
+
+ static J2eeContext create(ServletConfig sc) {
+ if(TomcatContext.tomcatp(sc))
+ return(new TomcatContext(sc));
+ return(new StandardContext(sc));