X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fdolda%2Fjsvc%2Fj2ee%2FJ2eeContext.java;fp=src%2Fdolda%2Fjsvc%2Fj2ee%2FJ2eeContext.java;h=84ce918a79f95108ca13bbaa990159e0f5750662;hb=6a0cb6cbc9b46f7e220e27e08b9eaa8805e99d6d;hp=bf1917c9c1ad8462f84d694648a7644873c89a49;hpb=9f01683a8fd45c753e6aa6580705e0810b701355;p=jsvc.git diff --git a/src/dolda/jsvc/j2ee/J2eeContext.java b/src/dolda/jsvc/j2ee/J2eeContext.java index bf1917c..84ce918 100644 --- a/src/dolda/jsvc/j2ee/J2eeContext.java +++ b/src/dolda/jsvc/j2ee/J2eeContext.java @@ -9,12 +9,13 @@ import java.io.*; public abstract class J2eeContext implements ServerContext { private final ServletConfig sc; private final long ctime; - protected final Properties config; + protected final Properties sysconfig, libconfig; protected J2eeContext(ServletConfig sc) { this.sc = sc; this.ctime = System.currentTimeMillis(); - config = new Properties(); + sysconfig = new Properties(); + libconfig = new Properties(); } static J2eeContext create(ServletConfig sc) { @@ -27,8 +28,16 @@ public abstract class J2eeContext implements ServerContext { return(ctime); } - public String config(String key) { - return((String)config.get(key)); + public String sysconfig(String key, String def) { + return(sysconfig.getProperty(key, def)); + } + + public String libconfig(String key, String def) { + return(libconfig.getProperty(key, def)); + } + + void loadconfig(InputStream in) throws IOException { + libconfig.load(in); } public ServletConfig j2eeconfig() {