Changed FreeMarkerHttpServlet static variables from public to protected. Moved files into the freemarker package as needed to support access to those variables.
This commit is contained in:
parent
787e378a3c
commit
4aa300e5a3
5 changed files with 11 additions and 8 deletions
|
@ -140,7 +140,7 @@
|
||||||
|
|
||||||
<listener>
|
<listener>
|
||||||
<listener-class>
|
<listener-class>
|
||||||
edu.cornell.mannlib.vitro.webapp.servlet.setup.FreeMarkerSetup
|
edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreeMarkerSetup
|
||||||
</listener-class>
|
</listener-class>
|
||||||
</listener>
|
</listener>
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class VitroHttpServlet extends HttpServlet
|
||||||
// is complete and no more pages are generated in JSP, this can be removed.
|
// is complete and no more pages are generated in JSP, this can be removed.
|
||||||
// Do this if FreeMarker is configured (i.e., not Datastar) and if we are not in
|
// Do this if FreeMarker is configured (i.e., not Datastar) and if we are not in
|
||||||
// a FreeMarkerHttpServlet, which will generate identity, menu, and footer from the page template.
|
// a FreeMarkerHttpServlet, which will generate identity, menu, and footer from the page template.
|
||||||
if ( FreeMarkerHttpServlet.config != null && !(this instanceof FreeMarkerHttpServlet) ) {
|
if ( FreeMarkerHttpServlet.isConfigured() && !(this instanceof FreeMarkerHttpServlet) ) {
|
||||||
FreeMarkerHttpServlet.getFreeMarkerComponentsForJsp(request, response);
|
FreeMarkerHttpServlet.getFreeMarkerComponentsForJsp(request, response);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,9 +55,9 @@ public class FreeMarkerHttpServlet extends VitroHttpServlet {
|
||||||
private static final Log log = LogFactory.getLog(FreeMarkerHttpServlet.class.getName());
|
private static final Log log = LogFactory.getLog(FreeMarkerHttpServlet.class.getName());
|
||||||
private static final int FILTER_SECURITY_LEVEL = LoginFormBean.EDITOR;
|
private static final int FILTER_SECURITY_LEVEL = LoginFormBean.EDITOR;
|
||||||
|
|
||||||
public static Configuration config = null;
|
protected static Configuration config = null;
|
||||||
public static String contextPath = null;
|
protected static String contextPath = null;
|
||||||
public static ServletContext context = null;
|
protected static ServletContext context = null;
|
||||||
|
|
||||||
protected VitroRequest vreq;
|
protected VitroRequest vreq;
|
||||||
protected HttpServletResponse response;
|
protected HttpServletResponse response;
|
||||||
|
@ -345,7 +345,10 @@ public class FreeMarkerHttpServlet extends VitroHttpServlet {
|
||||||
request.setAttribute("ftl_search", fcg.getSearch());
|
request.setAttribute("ftl_search", fcg.getSearch());
|
||||||
request.setAttribute("ftl_footer", fcg.getFooter());
|
request.setAttribute("ftl_footer", fcg.getFooter());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isConfigured() {
|
||||||
|
return config != null;
|
||||||
|
}
|
||||||
|
|
||||||
/* ******************** Utilities ******************* */
|
/* ******************** Utilities ******************* */
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.servlet.setup;
|
package edu.cornell.mannlib.vitro.webapp.controller.freemarker;
|
||||||
|
|
||||||
import javax.servlet.ServletContext;
|
import javax.servlet.ServletContext;
|
||||||
import javax.servlet.ServletContextEvent;
|
import javax.servlet.ServletContextEvent;
|
|
@ -1,6 +1,6 @@
|
||||||
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
/* $This file is distributed under the terms of the license in /doc/license.txt$ */
|
||||||
|
|
||||||
package edu.cornell.mannlib.vitro.webapp.controller;
|
package edu.cornell.mannlib.vitro.webapp.controller.freemarker;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
Loading…
Add table
Add a link
Reference in a new issue