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:
rjy7 2010-05-21 18:26:17 +00:00
parent 787e378a3c
commit 4aa300e5a3
5 changed files with 11 additions and 8 deletions

View file

@ -69,7 +69,7 @@ public class VitroHttpServlet extends HttpServlet
// 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
// 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);
}
}

View file

@ -55,9 +55,9 @@ public class FreeMarkerHttpServlet extends VitroHttpServlet {
private static final Log log = LogFactory.getLog(FreeMarkerHttpServlet.class.getName());
private static final int FILTER_SECURITY_LEVEL = LoginFormBean.EDITOR;
public static Configuration config = null;
public static String contextPath = null;
public static ServletContext context = null;
protected static Configuration config = null;
protected static String contextPath = null;
protected static ServletContext context = null;
protected VitroRequest vreq;
protected HttpServletResponse response;
@ -345,7 +345,10 @@ public class FreeMarkerHttpServlet extends VitroHttpServlet {
request.setAttribute("ftl_search", fcg.getSearch());
request.setAttribute("ftl_footer", fcg.getFooter());
}
public static boolean isConfigured() {
return config != null;
}
/* ******************** Utilities ******************* */

View file

@ -1,6 +1,6 @@
/* $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.ServletContextEvent;