From c0be9ea48d9fea344148d74639e2e5f7923dea0e Mon Sep 17 00:00:00 2001 From: mdb Date: Thu, 1 Mar 2001 21:06:22 +0000 Subject: [PATCH] Various enhancements to our webmacro extensions. git-svn-id: https://samskivert.googlecode.com/svn/trunk@60 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../samskivert/webmacro/ContextPopulator.java | 30 ---- .../webmacro/DispatcherServlet.java | 162 +++++++++++++----- .../com/samskivert/webmacro/DummyLogic.java | 19 ++ .../samskivert/webmacro/DummyPopulator.java | 19 -- .../com/samskivert/webmacro/FormUtil.java | 90 +++++++++- .../src/java/com/samskivert/webmacro/Log.java | 8 +- .../java/com/samskivert/webmacro/Logic.java | 30 ++++ .../src/java/com/samskivert/webmacro/Makefile | 6 +- 8 files changed, 265 insertions(+), 99 deletions(-) delete mode 100644 projects/samskivert/src/java/com/samskivert/webmacro/ContextPopulator.java create mode 100644 projects/samskivert/src/java/com/samskivert/webmacro/DummyLogic.java delete mode 100644 projects/samskivert/src/java/com/samskivert/webmacro/DummyPopulator.java create mode 100644 projects/samskivert/src/java/com/samskivert/webmacro/Logic.java diff --git a/projects/samskivert/src/java/com/samskivert/webmacro/ContextPopulator.java b/projects/samskivert/src/java/com/samskivert/webmacro/ContextPopulator.java deleted file mode 100644 index 9e4e7845..00000000 --- a/projects/samskivert/src/java/com/samskivert/webmacro/ContextPopulator.java +++ /dev/null @@ -1,30 +0,0 @@ -// -// $Id: ContextPopulator.java,v 1.1 2001/02/15 01:44:34 mdb Exp $ - -package com.samskivert.webmacro; - -import org.webmacro.servlet.WebContext; - -/** - * The context populator is called upon to populate the WebMacro web - * context, prior to invoking a particular WebMacro template upon it to - * generate a response page. The populator takes the place of the servlet - * in the standard WebMacro architecture and should perform all of the - * logic involved in handling a particular request. - * - * @see DispatcherServlet - */ -public interface ContextPopulator -{ - /** - * Perform any necessary computation and populate the context with - * data for this request. Any exceptions that are thrown will be - * converted into friendly error messages using the exception mapping - * services. - * - * @param context The WebMacro context in scope for this request. - * - * @see ExceptionMap - */ - public void populate (WebContext context) throws Exception; -} diff --git a/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java b/projects/samskivert/src/java/com/samskivert/webmacro/DispatcherServlet.java index 8b10de7d..9264cf29 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.2 2001/02/16 03:27:54 mdb Exp $ +// $Id: DispatcherServlet.java,v 1.3 2001/03/01 21:06:22 mdb Exp $ package com.samskivert.webmacro; @@ -9,7 +9,11 @@ import java.util.HashMap; import java.util.Properties; import java.util.StringTokenizer; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; + import javax.servlet.ServletConfig; +import javax.servlet.ServletContext; import javax.servlet.ServletException; import com.samskivert.util.ConfigUtil; @@ -22,12 +26,12 @@ import org.webmacro.servlet.*; * in the following ways: * *