VIVO-284 ServletContext.getRealPath() requires an absolute path.
This commit is contained in:
parent
2cd3f36db0
commit
a29b61d277
1 changed files with 1 additions and 1 deletions
|
@ -142,7 +142,7 @@ public abstract class FreemarkerConfiguration {
|
||||||
List<TemplateLoader> loaders = new ArrayList<TemplateLoader>();
|
List<TemplateLoader> loaders = new ArrayList<TemplateLoader>();
|
||||||
|
|
||||||
// Theme template loader - only if the theme has a template directory.
|
// Theme template loader - only if the theme has a template directory.
|
||||||
String themeTemplatePath = ctx.getRealPath(themeDir) + "/templates";
|
String themeTemplatePath = ctx.getRealPath("/" + themeDir) + "/templates";
|
||||||
File themeTemplateDir = new File(themeTemplatePath);
|
File themeTemplateDir = new File(themeTemplatePath);
|
||||||
if (themeTemplateDir.exists()) {
|
if (themeTemplateDir.exists()) {
|
||||||
loaders.add(new FreemarkerTemplateLoader(themeTemplateDir));
|
loaders.add(new FreemarkerTemplateLoader(themeTemplateDir));
|
||||||
|
|
Loading…
Add table
Reference in a new issue