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);