From 82e4493f4b376a79867c55ab7daa4cbbfedf1bda Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Fri, 18 Oct 2013 15:16:42 -0700 Subject: Fixing config issues when not running in tomcat --- src/com/p4square/grow/frontend/ErrorPage.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/com/p4square/grow/frontend/ErrorPage.java') diff --git a/src/com/p4square/grow/frontend/ErrorPage.java b/src/com/p4square/grow/frontend/ErrorPage.java index 721b477..5ae64d9 100644 --- a/src/com/p4square/grow/frontend/ErrorPage.java +++ b/src/com/p4square/grow/frontend/ErrorPage.java @@ -18,6 +18,8 @@ import org.restlet.representation.Representation; import org.restlet.representation.StringRepresentation; import org.restlet.representation.WriterRepresentation; +import com.p4square.fmfacade.FreeMarkerPageResource; + /** * ErrorPage wraps a String or Template Representation and displays the given * error message. @@ -35,6 +37,7 @@ public class ErrorPage extends WriterRepresentation { new ErrorPage("Error communicating with backend."); private static Template cTemplate = null; + private static Map cRoot = null; private final String mMessage; @@ -48,8 +51,9 @@ public class ErrorPage extends WriterRepresentation { mMessage = msg; } - public static synchronized void setTemplate(Template template) { + public static synchronized void setTemplate(Template template, Map root) { cTemplate = template; + cRoot = root; } protected Representation getRepresentation() { @@ -57,7 +61,7 @@ public class ErrorPage extends WriterRepresentation { return new StringRepresentation(mMessage); } else { - Map root = new HashMap(); + Map root = new HashMap(cRoot); root.put("errorMessage", mMessage); return new TemplateRepresentation(cTemplate, root, MediaType.TEXT_HTML); } -- cgit v1.2.3