From 9a4e163a8758563c04d36a72ee60669496530100 Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Sun, 3 Feb 2013 14:25:54 +0200 Subject: [PATCH] minor fixes related to path construction --- .../java/eu/svjatoslav/meviz/htmlindexer/WebIndexer.java | 8 +++++--- .../svjatoslav/meviz/htmlindexer/layouts/MixedLayout.java | 6 +++--- 2 files changed, 8 insertions(+), 6 deletions(-) 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"); -- 2.20.1