Correct use of _htDocsPath config in YaCyDefaultServlet to use servlet config variable

+ add some javadoc and remove a not useful static declaration
pull/66/head
reger 9 years ago
parent fcad2d0744
commit bf6ce33da3

@ -290,7 +290,7 @@ public class YaCyDefaultServlet extends HttpServlet {
if (!hasClass && (resource == null || !resource.exists()) && !pathInContext.contains("..")) {
// try to get this in the alternative htDocsPath
resource = Resource.newResource(new File(HTTPDFileHandler.htDocsPath, pathInContext));
resource = Resource.newResource(new File(_htDocsPath, pathInContext));
}
if (ConcurrentLog.isFine("FILEHANDLER")) {
@ -1034,7 +1034,14 @@ public class YaCyDefaultServlet extends HttpServlet {
}
}
private static String appendPath(String proplist, String path) {
/**
* Append a path string to comma separated string of pathes if not already
* contained in the proplist string
* @param proplist comma separated string of pathes
* @param path path to be appended
* @return comma separated string of pathes including param path
*/
private String appendPath(String proplist, String path) {
if (proplist.length() == 0) return path;
if (proplist.contains(path)) return proplist;
return proplist + "," + path;

Loading…
Cancel
Save