minor fixes related to path construction
[meviz.git] / src / main / java / eu / svjatoslav / meviz / htmlindexer / WebIndexer.java
index d4fd7e3..f659a35 100644 (file)
@@ -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<String> components = context.getLocalPathComponents();