/** * @param realpath path to this servlet's dir in webapps (typically nding in WEB-INF) * @param which parameter name to check: typically a relative path * @param dfalt for parameter * @return The absolute path froom the which directory(ending in '/'). */ private String getCachedString(String realpath, String which, String dfalt) { String dir = getInitParameter(which); if(dir == null) dir = dfalt; if(HTTPUtil.isAbsolutePath(dir)) dir = HTTPUtil.canonicalpath(dir); else dir = HTTPUtil.relpath(dir); dir = HTTPUtil.canonjoin(realpath,dir); if (!dir.endsWith("/")) dir += "/"; return (dir); }