diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/VitroAjaxController.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/VitroAjaxController.java index 6644cb604..43454195e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/VitroAjaxController.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/ajax/VitroAjaxController.java @@ -6,7 +6,6 @@ import java.io.IOException; import java.io.PrintWriter; import java.util.Map; -import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; @@ -75,7 +74,7 @@ public abstract class VitroAjaxController extends HttpServlet { * its data through a template. */ protected final Configuration getFreemarkerConfiguration(VitroRequest vreq) { - return FreemarkerConfigurationLoader.getConfig(vreq, getServletContext()); + return FreemarkerConfigurationLoader.getConfig(vreq); } /** diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerConfigurationLoader.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerConfigurationLoader.java index 261aa00ca..b4e206181 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerConfigurationLoader.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerConfigurationLoader.java @@ -19,10 +19,9 @@ public class FreemarkerConfigurationLoader { private static final Map themeToConfigMap = new HashMap(); - public static FreemarkerConfiguration getConfig(VitroRequest vreq, - ServletContext context) { + public static FreemarkerConfiguration getConfig(VitroRequest vreq) { String themeDir = getThemeDir(vreq.getAppBean()); - return getConfigForTheme(themeDir, vreq.getAppBean(), context); + return getConfigForTheme(themeDir, vreq.getAppBean(), vreq.getSession().getServletContext()); } private static String getThemeDir(ApplicationBean appBean) { diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java index 470d19bdb..9ec5dc68e 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/controller/freemarker/FreemarkerHttpServlet.java @@ -197,7 +197,7 @@ public class FreemarkerHttpServlet extends VitroHttpServlet { } protected FreemarkerConfiguration getConfig(VitroRequest vreq) { - return FreemarkerConfigurationLoader.getConfig(vreq, getServletContext()); + return FreemarkerConfigurationLoader.getConfig(vreq); } /** diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java index 4034b08df..d41667044 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/edit/n3editing/VTwo/EditConfigurationUtils.java @@ -257,7 +257,7 @@ public class EditConfigurationUtils { //Generate HTML for a specific field name given public static String generateHTMLForElement(VitroRequest vreq, String fieldName, EditConfigurationVTwo editConfig) { String html = ""; - Configuration fmConfig = FreemarkerConfigurationLoader.getConfig(vreq, vreq.getSession().getServletContext()); + Configuration fmConfig = FreemarkerConfigurationLoader.getConfig(vreq); FieldVTwo field = editConfig == null ? null : editConfig.getField(fieldName); MultiValueEditSubmission editSub = EditSubmissionUtils.getEditSubmissionFromSession(vreq.getSession(), editConfig); diff --git a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java index d5eacd8a5..395c8e08a 100644 --- a/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java +++ b/webapp/src/edu/cornell/mannlib/vitro/webapp/web/jsptags/InputElementFormattingTag.java @@ -406,7 +406,7 @@ public class InputElementFormattingTag extends TagSupport { } //get freemarker Configuration - Configuration fmConfig = FreemarkerConfigurationLoader.getConfig(vreq, pageContext.getServletContext()); + Configuration fmConfig = FreemarkerConfigurationLoader.getConfig(vreq); /* populate the pieces */ String classStr = doClass();