logger.log(Level.WARNING, "no permissions to fetch Tomcat base directory while reading configuration", e);
return;
}
- sysconfig.put("jsvc.storage", "file:" + new File(new File(base, "work"), "jsvc").getPath());
+ File sroot = new File(new File(base, "work"), "jsvc");
+ if(name != null)
+ sroot = new File(sroot, name());
+ sysconfig.put("jsvc.storage", "file:" + sroot.getPath());
File cdir = new File(base, "conf");
try {
loadprops(sysconfig, new File(cdir, "jsvc.properties"));
public static void register() {
Store.register("file", new Factory() {
public Store create(String rootname, Package pkg) {
- java.io.File root = new java.io.File(rootname);
- ThreadContext ctx = ThreadContext.current();
- if(ctx != null) {
- if(ctx.server().name() != null)
- root = new java.io.File(root, ctx.server().name());
- }
- return(new FileStore(pkg, root));
+ return(new FileStore(pkg, new java.io.File(rootname)));
}
});
}