/** * Given a application relative path, returns the real path relative to the * application root * */ public String getRealPath( String path ) { String result = ""; String base = context.getApplicationRoot(); if (base.endsWith(java.io.File.separator)) { if (path.startsWith("/")) { result = base.concat(path.substring(1)); return result; } } else { if (!path.startsWith("/")) { result = base.concat("/").concat(path); return result; } } return base.concat(path); }