From 7ede7ff62ebff0f796191fa8d2ebf85333722f89 Mon Sep 17 00:00:00 2001 From: mdb Date: Fri, 19 Nov 2004 17:36:47 +0000 Subject: [PATCH] Having the context path around always will help us to avoid ever hard coding it. git-svn-id: https://samskivert.googlecode.com/svn/trunk@1529 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/velocity/DispatcherServlet.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java b/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java index 68e0aebd..151c6edd 100644 --- a/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java +++ b/projects/samskivert/src/java/com/samskivert/velocity/DispatcherServlet.java @@ -275,6 +275,10 @@ public class DispatcherServlet extends VelocityServlet int siteId = ident.identifySite(req); ctx.put("__siteid__", new Integer(siteId)); + // put the context path in the context as well to make it easier + // to construct full paths + ctx.put("context_path", req.getContextPath()); + // then select the template Template tmpl = selectTemplate(siteId, ictx);