From f9163dc894f742d8984bf9b5a13ff3c01942f4ac Mon Sep 17 00:00:00 2001 From: mdb Date: Sat, 26 May 2001 03:24:19 +0000 Subject: [PATCH] Fetch the templates via their path relative to the servlet root since we now load everything through the servlet. This allows us to be totally application root agnostic. git-svn-id: https://samskivert.googlecode.com/svn/trunk@119 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../java/com/samskivert/webmacro/DispatcherServlet.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java b/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java index 2100808d..d08fbf83 100644 --- a/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java +++ b/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java @@ -1,5 +1,5 @@ // -// $Id: DispatcherServlet.java,v 1.9 2001/03/04 06:37:51 mdb Exp $ +// $Id: DispatcherServlet.java,v 1.10 2001/05/26 03:24:19 mdb Exp $ package com.samskivert.webmacro; @@ -303,8 +303,9 @@ public class DispatcherServlet extends WMServlet protected Template selectTemplate (WebContext ctx) throws NotFoundException { - String path = cleanupURI(ctx.getRequest().getRequestURI()); - // Log.info("Loading template [path=" + path + "]."); + // String path = cleanupURI(ctx.getRequest().getRequestURI()); + String path = ctx.getRequest().getServletPath(); + Log.info("Loading template [path=" + path + "]."); return getTemplate(path); }