From 74297a14af06a12111e504df8c168809eca44393 Mon Sep 17 00:00:00 2001 From: rjy7 Date: Wed, 2 Jun 2010 17:29:12 +0000 Subject: [PATCH] Remove call to FreeMarkerHttpServlet.getFreeMarkerComponentsForJsp from VitroHttpServlet, since was getting called more than once per request (since there are multiple servlets that are called for a single request). Use calls from the jsps instead. --- productMods/themes/vivo-basic/jsp/footer.jsp | 2 +- productMods/themes/vivo-basic/jsp/identity.jsp | 7 +------ productMods/themes/vivo-basic/jsp/menu.jsp | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/productMods/themes/vivo-basic/jsp/footer.jsp b/productMods/themes/vivo-basic/jsp/footer.jsp index ecdd2e2b..db05b3d5 100644 --- a/productMods/themes/vivo-basic/jsp/footer.jsp +++ b/productMods/themes/vivo-basic/jsp/footer.jsp @@ -6,7 +6,7 @@ <% // If the request was for a jsp rather than a servlet, we didn't get these yet. // This is here as a safety net. We should have gotten the values in identity.jsp, - // since it's the first one we hit. + // since it's the first jsp we hit. String footer = (String) request.getAttribute("ftl_footer"); if (footer == null) { FreeMarkerHttpServlet.getFreeMarkerComponentsForJsp(request, response); diff --git a/productMods/themes/vivo-basic/jsp/identity.jsp b/productMods/themes/vivo-basic/jsp/identity.jsp index 224932f8..16bfc846 100644 --- a/productMods/themes/vivo-basic/jsp/identity.jsp +++ b/productMods/themes/vivo-basic/jsp/identity.jsp @@ -4,12 +4,7 @@ <%@ page import="edu.cornell.mannlib.vitro.webapp.controller.freemarker.FreeMarkerHttpServlet" %> <% - - // If the request was for a jsp rather than a servlet, we didn't get these yet. - String identity = (String) request.getAttribute("ftl_identity"); - if (identity == null) { - FreeMarkerHttpServlet.getFreeMarkerComponentsForJsp(request, response); - } +FreeMarkerHttpServlet.getFreeMarkerComponentsForJsp(request, response); %> ${ftl_identity} diff --git a/productMods/themes/vivo-basic/jsp/menu.jsp b/productMods/themes/vivo-basic/jsp/menu.jsp index 6a934dbe..cda0b100 100644 --- a/productMods/themes/vivo-basic/jsp/menu.jsp +++ b/productMods/themes/vivo-basic/jsp/menu.jsp @@ -7,7 +7,7 @@ <% // If the request was for a jsp rather than a servlet, we didn't get these yet. // This is here as a safety net. We should have gotten the values in identity.jsp, - // since it's the first one we hit. + // since it's the first jsp we hit. String menu = (String) request.getAttribute("ftl_menu"); if (menu == null) { FreeMarkerHttpServlet.getFreeMarkerComponentsForJsp(request, response);