From: Svjatoslav Agejenko Date: Sun, 3 Feb 2013 12:25:54 +0000 (+0200) Subject: minor fixes related to path construction X-Git-Tag: meviz-1.0~94 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=9a4e163a8758563c04d36a72ee60669496530100;p=meviz.git minor fixes related to path construction --- diff --git a/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java b/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java index d4fd7e3..f659a35 100644 --- a/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java +++ b/src/main/java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java @@ -17,15 +17,17 @@ import eu.svjatoslav.meviz.htmlindexer.metadata.fileTypes.Picture; public class WebIndexer extends AbstractIndexer { private final String globalPrefix; + private final String jspPath; - public WebIndexer(final String globalPrefix) { + public WebIndexer(final String globalPrefix, final String jspPath) { this.globalPrefix = globalPrefix; + this.jspPath = jspPath; } @Override public String getDirectoryUrl(final AbstractFile directory, final IndexingContext context) { - return "photos.jsp?path=" + context.getLocalUrl() + "/" + return jspPath + context.getLocalUrl() + "/" + UrlParamEncoder.encode(directory.fileName); } @@ -73,7 +75,7 @@ public class WebIndexer extends AbstractIndexer { public String getParentDirectoryUrl(final IndexingContext context) { final StringBuffer result = new StringBuffer(); - result.append("photos.jsp?path="); + result.append(jspPath); final List components = context.getLocalPathComponents(); diff --git a/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java b/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java index c51d7fa..96f498e 100755 --- a/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java +++ b/src/main/java/eu/svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java @@ -166,7 +166,7 @@ public class MixedLayout implements Layout { .append("\n"); + + "/" + file.fileName) + "\">\n"); filesHtml.append("\n"); // if browser cannot play video directry, fall back to java Applet @@ -174,7 +174,7 @@ public class MixedLayout implements Layout { .append("\n"); filesHtml.append(" \n"); filesHtml.append(" \n"); filesHtml.append(" \n"); @@ -191,7 +191,7 @@ public class MixedLayout implements Layout { + "            "); filesHtml.append("download as OGV\n"); filesHtml.append("\n");