You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ge...@apache.org on 2005/02/13 20:26:09 UTC

svn commit: r153658 - in struts/core/trunk/src/share/org/apache/struts/chain/commands: ./ servlet/

Author: germuska
Date: Sun Feb 13 11:26:03 2005
New Revision: 153658

URL: http://svn.apache.org/viewcvs?view=rev&rev=153658
Log:
Tighten expectation that all Struts commands will be used with a chain Context class which implements ActionContext.  Explicitly use ActionContext in abstract method signatures to eliminate repetitive casting.  (Would it be worth making all Struts commands extend a simple abstract ActionContextCommand which delegated execute(Context) to an execute(ActionContext) method?)

Modified:
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractCreateActionForm.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExceptionHandler.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExecuteAction.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformForward.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformInclude.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractRequestNoCache.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectAction.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectForward.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectInput.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectLocale.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSetContentType.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractValidateActionForm.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/ExceptionCatcher.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateAction.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateActionForm.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExceptionHandler.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExecuteAction.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformForward.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformInclude.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/RequestNoCache.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectAction.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectForward.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectInput.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectLocale.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectModule.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SetContentType.java
    struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ValidateActionForm.java

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractCreateActionForm.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractCreateActionForm.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractCreateActionForm.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractCreateActionForm.java Sun Feb 13 11:26:03 2005
@@ -114,7 +114,7 @@
         }
 
         instance = createNewFormInstance(actionCtx, actionConfig, formBeanConfig);
-
+        actionCtx.setActionForm(instance);
 
         /** @todo Perhaps this logic could be moved into the ActionContext implementation,
          * or changed to a two-arg form: ActionContext.setActionForm(ActionForm, String)
@@ -132,6 +132,10 @@
     }
 
     /**
+     * Request the creation of a new ActionForm instance based on the information in 
+     * the <code>ActionContext</code>, <code>ActionConfig</code>, and <code>FormBeanConfig</code>.
+     * :TODO if FormBeanConfig.createActionForm took ActionContext as an argument instead of Servlet,
+     * this method wouldn't need to be abstract.
      * @param actionCtx
      * @param actionConfig
      * @param formBeanConfig

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExceptionHandler.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExceptionHandler.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExceptionHandler.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExceptionHandler.java Sun Feb 13 11:26:03 2005
@@ -21,7 +21,7 @@
 import org.apache.commons.chain.Context;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.struts.chain.Constants;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.config.ActionConfig;
 import org.apache.struts.config.ExceptionConfig;
 import org.apache.struts.config.ForwardConfig;
@@ -42,119 +42,10 @@
     // ------------------------------------------------------ Instance Variables
 
 
-    private String actionConfigKey = Constants.ACTION_CONFIG_KEY;
-    private String exceptionKey = Constants.EXCEPTION_KEY;
-    private String forwardConfigKey = Constants.FORWARD_CONFIG_KEY;
-    private String moduleConfigKey = Constants.MODULE_CONFIG_KEY;
-
     private static final Log log =
         LogFactory.getLog(AbstractExceptionHandler.class);
 
 
-    // -------------------------------------------------------------- Properties
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ActionConfig</code> for the currently selected application
-     * action is stored.</p>
-     */
-    public String getActionConfigKey() {
-
-        return (this.actionConfigKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ActionConfig</code> for the currently selected application
-     * action is stored.</p>
-     *
-     * @param actionConfigKey The new context attribute key
-     */
-    public void setActionConfigKey(String actionConfigKey) {
-
-        this.actionConfigKey = actionConfigKey;
-
-    }
-
-
-    /**
-     * <p>Return the context attribute key under which any
-     * thrown exception will be stored.</p>
-     */
-    public String getExceptionKey() {
-
-        return (this.exceptionKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which any
-     * thrown exception will be stored.</p>
-     *
-     * @param exceptionKey The new context attribute key
-     */
-    public void setExceptionKey(String exceptionKey) {
-
-        this.exceptionKey = exceptionKey;
-
-    }
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ForwardConfig</code> for the currently selected application
-     * action is stored.</p>
-     */
-    public String getForwardConfigKey() {
-
-        return (this.forwardConfigKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ForwardConfig</code> for the currently selected application
-     * action is stored.</p>
-     *
-     * @param forwardConfigKey The new context attribute key
-     */
-    public void setForwardConfigKey(String forwardConfigKey) {
-
-        this.forwardConfigKey = forwardConfigKey;
-
-    }
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ModuleConfig</code> for the currently selected application
-     * action is stored.</p>
-     */
-    public String getModuleConfigKey() {
-
-        return (this.moduleConfigKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ModuleConfig</code> for the currently selected application
-     * action is stored.</p>
-     *
-     * @param moduleConfigKey The new context attribute key
-     */
-    public void setModuleConfigKey(String moduleConfigKey) {
-
-        this.moduleConfigKey = moduleConfigKey;
-
-    }
-
 
     // ---------------------------------------------------------- Public Methods
 
@@ -172,22 +63,18 @@
      *  else <code>true</code> to complete processing
      */
     public boolean execute(Context context) throws Exception {
-
+        ActionContext actionCtx = (ActionContext) context;
         // Look up the exception that was thrown
-        Exception exception = (Exception)
-            context.get(getExceptionKey());
+        Exception exception = actionCtx.getException();
         if (exception == null) {
-            log.warn("No Exception found under key '" +
-                     getExceptionKey() + "'");
+            log.warn("No Exception found in ActionContext");
             return (true);
         }
 
         // Look up the local or global exception handler configuration
         ExceptionConfig exceptionConfig = null;
-        ActionConfig actionConfig = (ActionConfig)
-            context.get(getActionConfigKey());
-        ModuleConfig moduleConfig = (ModuleConfig)
-            context.get(getModuleConfigKey());
+        ActionConfig actionConfig = actionCtx.getActionConfig();
+        ModuleConfig moduleConfig = actionCtx.getModuleConfig();
 
 
         if (actionConfig != null) {
@@ -202,10 +89,10 @@
             throw exception;
         }
         ForwardConfig forwardConfig =
-            handle(context, exception, exceptionConfig,
+            handle(actionCtx, exception, exceptionConfig,
                    actionConfig, moduleConfig);
         if (forwardConfig != null) {
-            context.put(getForwardConfigKey(), forwardConfig);
+            actionCtx.setForwardConfig(forwardConfig);
             return (false);
         } else {
             return (true);
@@ -229,7 +116,7 @@
      * @return the <code>ForwardConfig</code> to be processed next (if any),
      *  or <code>null</code> if processing has been completed
      */
-    protected abstract ForwardConfig handle(Context context,
+    protected abstract ForwardConfig handle(ActionContext context,
                                             Exception exception,
                                             ExceptionConfig exceptionConfig,
                                             ActionConfig actionConfig,

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExecuteAction.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExecuteAction.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExecuteAction.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractExecuteAction.java Sun Feb 13 11:26:03 2005
@@ -71,7 +71,7 @@
 
         // Execute the Action for this request, caching returned ActionForward
         ForwardConfig forwardConfig =
-            execute(context, action, actionConfig, actionForm);
+            execute(actionCtx, action, actionConfig, actionForm);
         actionCtx.setForwardConfig(forwardConfig);
 
         return (false);
@@ -94,7 +94,7 @@
      *
      * @exception Exception if thrown by the <code>Action</code>
      */
-    protected abstract ForwardConfig execute(Context context,
+    protected abstract ForwardConfig execute(ActionContext context,
                                              Action action,
                                              ActionConfig actionConfig,
                                              ActionForm actionForm)

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformForward.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformForward.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformForward.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformForward.java Sun Feb 13 11:26:03 2005
@@ -19,7 +19,7 @@
 
 import org.apache.commons.chain.Command;
 import org.apache.commons.chain.Context;
-import org.apache.struts.chain.Constants;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.config.ForwardConfig;
 
 
@@ -34,67 +34,7 @@
 public abstract class AbstractPerformForward implements Command {
 
 
-    // ------------------------------------------------------ Instance Variables
-
-
-    private String forwardConfigKey = Constants.FORWARD_CONFIG_KEY;
-
-    private String moduleConfigKey = Constants.MODULE_CONFIG_KEY;
-
-
-    // -------------------------------------------------------------- Properties
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ForwardConfig</code> for the currently selected application
-     * action is stored.</p>
-     */
-    public String getForwardConfigKey() {
-
-        return (this.forwardConfigKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ForwardConfig</code> for the currently selected application
-     * action is stored.</p>
-     *
-     * @param forwardConfigKey The new context attribute key
-     */
-    public void setForwardConfigKey(String forwardConfigKey) {
-
-        this.forwardConfigKey = forwardConfigKey;
-
-    }
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ModuleConfig</code> for the currently selected application
-     * module will be stored.</p>
-     */
-    public String getModuleConfigKey() {
-
-        return (this.moduleConfigKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ModuleConfig</code> for the currently selected application
-     * module will be stored.</p>
-     *
-     * @param moduleConfigKey The new context attribute key
-     */
-    public void setModuleConfigKey(String moduleConfigKey) {
-
-        this.moduleConfigKey = moduleConfigKey;
-
-    }
-
+ 
 
     // ---------------------------------------------------------- Public Methods
 
@@ -108,16 +48,15 @@
      * @return <code>true</code> so that processing completes
      */
     public boolean execute(Context context) throws Exception {
-
+        ActionContext actionCtx = (ActionContext) context;
         // Is there a ForwardConfig to be performed?
-        ForwardConfig forwardConfig = (ForwardConfig)
-            context.get(getForwardConfigKey());
+        ForwardConfig forwardConfig = actionCtx.getForwardConfig();
         if (forwardConfig == null) {
             return (false);
         }
 
         // Perform the appropriate processing on this ActionForward
-        perform(context, forwardConfig);
+        perform(actionCtx, forwardConfig);
         return (true);
 
     }
@@ -133,7 +72,7 @@
      * @param context The context for this request
      * @param forwardConfig The forward to be performed
      */
-    protected abstract void perform(Context context,
+    protected abstract void perform(ActionContext context,
                                     ForwardConfig forwardConfig)
         throws Exception;
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformInclude.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformInclude.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformInclude.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractPerformInclude.java Sun Feb 13 11:26:03 2005
@@ -60,7 +60,7 @@
         String uri = moduleConfig.getPrefix() + include;
 
         // Perform the appropriate processing on this include uri
-        perform(context, uri);
+        perform(actionCtx, uri);
         return (true);
 
     }
@@ -76,7 +76,7 @@
      * @param context The context for this request
      * @param include The forward to be performed
      */
-    protected abstract void perform(Context context,
+    protected abstract void perform(ActionContext context,
                                     String include)
         throws Exception;
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractRequestNoCache.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractRequestNoCache.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractRequestNoCache.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractRequestNoCache.java Sun Feb 13 11:26:03 2005
@@ -53,7 +53,7 @@
             
         // If the module is configured for no caching, request no caching    
         if (moduleConfig.getControllerConfig().getNocache()) {
-            requestNoCache(context);
+            requestNoCache(actionCtx);
         }
         return (false);
 
@@ -68,7 +68,7 @@
      *
      * @param context The <code>Context</code> for this request
      */
-    protected abstract void requestNoCache(Context context);
+    protected abstract void requestNoCache(ActionContext context);
 
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectAction.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectAction.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectAction.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectAction.java Sun Feb 13 11:26:03 2005
@@ -55,13 +55,14 @@
         ActionContext actionCtx = (ActionContext) context;
 
         // Identify the matching path for this request
-        String path = getPath(context);
+        String path = getPath(actionCtx);
 
         // Cache the corresponding ActonConfig instance
         ModuleConfig moduleConfig = actionCtx.getModuleConfig();
         ActionConfig actionConfig = moduleConfig.findActionConfig(path);
 
         if (actionConfig == null) {
+            //:TODO Shouldn't this be the responsibility of ModuleConfig?
             // Locate the mapping for unknown paths (if any)
             ActionConfig configs[] = moduleConfig.findActionConfigs();
             for (int i = 0; i < configs.length; i++) {
@@ -95,7 +96,7 @@
      * @exception IllegalArgumentException if no valid
      *  action can be identified for this request
      */
-    protected abstract String getPath(Context context);
+    protected abstract String getPath(ActionContext context);
 
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectForward.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectForward.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectForward.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectForward.java Sun Feb 13 11:26:03 2005
@@ -70,7 +70,7 @@
         ForwardConfig forwardConfig = null;
         String forward = actionConfig.getForward();
         if (forward != null) {
-            forwardConfig = forward(context, moduleConfig, forward);
+            forwardConfig = forward(actionCtx, moduleConfig, forward);
             if (log.isDebugEnabled()) {
                 log.debug("Forwarding to " + forwardConfig);
             }
@@ -92,7 +92,7 @@
      * @param moduleConfig The <code>ModuleConfig</code> for this request
      * @param uri The module-relative URI to be the destination
      */
-    protected abstract ForwardConfig forward(Context context,
+    protected abstract ForwardConfig forward(ActionContext context,
                                              ModuleConfig moduleConfig,
                                              String uri);
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectInput.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectInput.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectInput.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectInput.java Sun Feb 13 11:26:03 2005
@@ -83,7 +83,7 @@
             if (log.isTraceEnabled()) {
                 log.trace("Delegating to forward() for '" + input + "'");
             }
-            forwardConfig = forward(context, moduleConfig, input);
+            forwardConfig = forward(actionCtx, moduleConfig, input);
         }
         if (log.isDebugEnabled()) {
             log.debug("Forwarding back to " + forwardConfig);
@@ -105,7 +105,7 @@
      * @param moduleConfig The <code>ModuleConfig</code> for this request
      * @param uri The module-relative URI to be the destination
      */
-    protected abstract ForwardConfig forward(Context context,
+    protected abstract ForwardConfig forward(ActionContext context,
                                              ModuleConfig moduleConfig,
                                              String uri);
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectLocale.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectLocale.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectLocale.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectLocale.java Sun Feb 13 11:26:03 2005
@@ -61,7 +61,7 @@
         }
 
         // Retrieve and cache appropriate Locale for this request
-        Locale locale = getLocale(context);
+        Locale locale = getLocale(actionCtx);
         log.debug("set context locale to " + locale);
         actionCtx.setLocale(locale);
 
@@ -78,7 +78,7 @@
      *
      * @param context The <code>Context</code> for this request
      */
-    protected abstract Locale getLocale(Context context);
+    protected abstract Locale getLocale(ActionContext context);
 
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSelectModule.java Sun Feb 13 11:26:03 2005
@@ -45,60 +45,6 @@
     private String moduleConfigKey = Constants.MODULE_CONFIG_KEY;
 
 
-    // -------------------------------------------------------------- Properties
-
-
-    /**
-     * <p>Return the context attribute key under which the default
-     * <code>MessageResources</code> for the currently selected application
-     * module will be stored.</p>
-     */
-    public String getMessageResourcesKey() {
-
-        return (this.messageResourcesKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the default
-     * <code>MessageResources</code> for the currently selected application
-     * module will be stored.</p>
-     *
-     * @param messageResourcesKey The new context attribute key
-     */
-    public void setMessageResourcesKey(String messageResourcesKey) {
-
-        this.messageResourcesKey = messageResourcesKey;
-
-    }
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ModuleConfig</code> for the currently selected application
-     * module will be stored.</p>
-     */
-    public String getModuleConfigKey() {
-
-        return (this.moduleConfigKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ModuleConfig</code> for the currently selected application
-     * module will be stored.</p>
-     *
-     * @param moduleConfigKey The new context attribute key
-     */
-    public void setModuleConfigKey(String moduleConfigKey) {
-
-        this.moduleConfigKey = moduleConfigKey;
-
-    }
-
 
     // ---------------------------------------------------------- Public Methods
 
@@ -118,25 +64,21 @@
     public boolean execute(Context context) throws Exception {
 
         // Identify the module prefix for the current module
-        String prefix = getPrefix(context);
+        ActionContext actionCtx = (ActionContext) context;
+        String prefix = getPrefix(actionCtx);
 
         // Cache the corresponding ModuleConfig and MessageResources instances
-        ActionContext actionCtx = (ActionContext) context;
         ModuleConfig moduleConfig = (ModuleConfig)
             actionCtx.getApplicationScope().get(Globals.MODULE_KEY + prefix);
         if (moduleConfig == null) {
             throw new IllegalArgumentException("No module config for prefix '" +
                                                prefix + "'");
         }
-        actionCtx.put(getModuleConfigKey(), moduleConfig);
-        actionCtx.getRequestScope().put(Globals.MODULE_KEY, moduleConfig);
+        actionCtx.setModuleConfig(moduleConfig);
         MessageResources messageResources = (MessageResources)
             actionCtx.getApplicationScope().get(Globals.MESSAGES_KEY + prefix);
         if (messageResources != null) {
-            actionCtx.put(getMessageResourcesKey(),
-                                         messageResources);
-            actionCtx.getRequestScope().put(Globals.MESSAGES_KEY,
-                                           messageResources);
+            actionCtx.setMessageResources(messageResources);
         }
 
         return (false);
@@ -156,7 +98,7 @@
      * @exception IllegalArgumentException if no valid
      *  ModuleConfig or MessageResources can be identified for this request
      */
-    protected abstract String getPrefix(Context context);
+    protected abstract String getPrefix(ActionContext context);
 
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSetContentType.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSetContentType.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSetContentType.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractSetContentType.java Sun Feb 13 11:26:03 2005
@@ -53,7 +53,7 @@
         // If the content type is configured, set it for the response
         String contentType = moduleConfig.getControllerConfig().getContentType();
         if (contentType != null) {
-            setContentType(context, contentType);
+            setContentType(actionCtx, contentType);
         }
         return (false);
 
@@ -69,7 +69,7 @@
      * @param context The <code>Context</code> for this request
      * @param contentType The content type for the response
      */
-    protected abstract void setContentType(Context context, String contentType);
+    protected abstract void setContentType(ActionContext context, String contentType);
 
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractValidateActionForm.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractValidateActionForm.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractValidateActionForm.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/AbstractValidateActionForm.java Sun Feb 13 11:26:03 2005
@@ -81,7 +81,7 @@
         }
 
         // Call the validate() method of this form bean
-        ActionErrors errors = validate(context, actionConfig, actionForm);
+        ActionErrors errors = validate(actionCtx, actionConfig, actionForm);
 
         // If there were no errors, proceed normally
         if ((errors == null) || (errors.isEmpty())) {
@@ -110,7 +110,7 @@
      * @param actionConfig The <code>ActionConfig</code> for this request
      * @param actionForm The form bean for this request
      */
-    protected abstract ActionErrors validate(Context context,
+    protected abstract ActionErrors validate(ActionContext context,
                                              ActionConfig actionConfig,
                                              ActionForm actionForm);
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/ExceptionCatcher.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/ExceptionCatcher.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/ExceptionCatcher.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/ExceptionCatcher.java Sun Feb 13 11:26:03 2005
@@ -25,6 +25,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.struts.chain.Constants;
+import org.apache.struts.chain.contexts.ActionContext;
 
 
 /**
@@ -101,29 +102,6 @@
     }
 
 
-    /**
-     * <p>Return the context attribute key under which any
-     * thrown exception will be stored.</p>
-     */
-    public String getExceptionKey() {
-
-        return (this.exceptionKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which any
-     * thrown exception will be stored.</p>
-     *
-     * @param exceptionKey The new context attribute key
-     */
-    public void setExceptionKey(String exceptionKey) {
-
-        this.exceptionKey = exceptionKey;
-
-    }
-
 
     // ---------------------------------------------------------- Public Methods
 
@@ -137,8 +115,8 @@
      * @return <code>false</code> so that processing continues
      */
     public boolean execute(Context context) throws Exception {
-
-        context.remove(getExceptionKey());
+        ActionContext actionCtx = (ActionContext) context;
+        actionCtx.setException(null);
         return (false);
 
     }
@@ -156,7 +134,6 @@
      *  <code>null</code>
      */ 
     public boolean postprocess(Context context, Exception exception) {
-
         // Do nothing if there was no exception thrown
         if (exception == null) {
             return (false);
@@ -166,34 +143,12 @@
         if (log.isDebugEnabled()) {
             log.debug("Attempting to handle a thrown exception");
         }
-        context.put(getExceptionKey(), exception);
+        ActionContext actionCtx = (ActionContext) context;
+        actionCtx.setException(exception);
 
         // Execute the specified command
         try {
-            String catalogName = getCatalogName();
-            Catalog catalog = null;
-            if (catalogName == null) {
-                catalog = CatalogFactory.getInstance().getCatalog();
-                if (catalog == null) {
-                    log.error("Cannot find default catalog");
-                    throw new IllegalArgumentException
-                        ("Cannot find default catalog");
-                }
-            } else {
-                catalog = CatalogFactory.getInstance().getCatalog(catalogName);
-                if (catalog == null) {
-                    log.error("Cannot find catalog '" + catalogName + "'");
-                    throw new IllegalArgumentException
-                        ("Cannot find catalog '" + catalogName + "'");
-                }
-            }
-            String exceptionCommand = getExceptionCommand();
-            if (exceptionCommand == null) {
-                log.error("No exceptionCommand property specified");
-                throw new IllegalStateException
-                    ("No exceptionCommand property specfied");
-            }
-            Command command = catalog.getCommand(exceptionCommand);
+            Command command = lookupExceptionCommand();
             if (command == null) {
                 log.error("Cannot find exceptionCommand '" +
                           exceptionCommand + "'");
@@ -215,6 +170,32 @@
 
     }
 
-
+    protected Command lookupExceptionCommand() throws IllegalArgumentException, IllegalStateException {
+        String catalogName = getCatalogName();
+        Catalog catalog = null;
+        if (catalogName == null) {
+            catalog = CatalogFactory.getInstance().getCatalog();
+            if (catalog == null) {
+                log.error("Cannot find default catalog");
+                throw new IllegalArgumentException
+                    ("Cannot find default catalog");
+            }
+        } else {
+            catalog = CatalogFactory.getInstance().getCatalog(catalogName);
+            if (catalog == null) {
+                log.error("Cannot find catalog '" + catalogName + "'");
+                throw new IllegalArgumentException
+                    ("Cannot find catalog '" + catalogName + "'");
+            }
+        }
+        String exceptionCommand = getExceptionCommand();
+        if (exceptionCommand == null) {
+            log.error("No exceptionCommand property specified");
+            throw new IllegalStateException
+                ("No exceptionCommand property specfied");
+        }
+        return catalog.getCommand(exceptionCommand);
+        
+    }
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/ExecuteCommand.java Sun Feb 13 11:26:03 2005
@@ -21,7 +21,7 @@
 import org.apache.commons.chain.Context;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.struts.chain.Constants;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.config.ActionConfig;
 
 /**
@@ -39,67 +39,10 @@
 
 
     // ------------------------------------------------------ Instance Variables
-
-
-    private String actionConfigKey = Constants.ACTION_CONFIG_KEY;
-    private String validKey = Constants.VALID_KEY;
-
     private static final Log log =
         LogFactory.getLog(ExecuteCommand.class);
 
 
-    // -------------------------------------------------------------- Properties
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ActionConfig</code> for the currently selected application
-     * action is stored.</p>
-     */
-    public String getActionConfigKey() {
-
-        return (this.actionConfigKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ActionConfig</code> for the currently selected application
-     * action is stored.</p>
-     *
-     * @param actionConfigKey The new context attribute key
-     */
-    public void setActionConfigKey(String actionConfigKey) {
-
-        this.actionConfigKey = actionConfigKey;
-
-    }
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * validity flag for this request is stored.</p>
-     */
-    public String getValidKey() {
-
-        return (this.validKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * validity flag for this request is stored.</p>
-     *
-     * @param validKey The new context attribute key
-     */
-    public void setValidKey(String validKey) {
-
-        this.validKey = validKey;
-
-    }
-
 
     // ---------------------------------------------------------- Public Methods
 
@@ -114,9 +57,10 @@
      */
     public boolean execute(Context context) throws Exception {
 
-        if (shouldProcess(context)) {
+        ActionContext actionCtx = (ActionContext) context;
+        if (shouldProcess(actionCtx)) {
 
-            Command command = getCommand(context);
+            Command command = getCommand(actionCtx);
 
             if (command != null) {
                 return (command.execute(context));
@@ -134,9 +78,9 @@
      * @param context
      * @return
      */
-    protected boolean shouldProcess(Context context) {
+    protected boolean shouldProcess(ActionContext context) {
         // Skip processing if the current request is not valid
-        Boolean valid = (Boolean) context.get(getValidKey());
+        Boolean valid = context.getFormValid();
         return ((valid != null) && valid.booleanValue());
         
     }
@@ -148,10 +92,9 @@
      * @return a <code>Command</code> to execute, or null if none is specified
      * or if the specified command cannot be found.
      */
-    protected Command getCommand(Context context) {
+    protected Command getCommand(ActionContext context) {
 
-        ActionConfig actionConfig = (ActionConfig)
-                                    context.get(getActionConfigKey());
+        ActionConfig actionConfig = context.getActionConfig();
 
         String commandName = actionConfig.getCommand();
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateAction.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateAction.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateAction.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateAction.java Sun Feb 13 11:26:03 2005
@@ -44,20 +44,18 @@
     private static final Log log = LogFactory.getLog(CreateAction.class);
 
 
-    /* (non-Javadoc)
-     * @see org.apache.struts.chain.commands.CreateAction#getAction(org.apache.commons.chain.Context, java.lang.String, org.apache.struts.config.ActionConfig)
+    /* :TODO The Action class' dependency on having its "servlet" property set requires this
+     * API-dependent subclass of AbstractCreateAction.  
      */
     protected synchronized Action getAction(ActionContext context, String type,
             ActionConfig actionConfig) throws Exception  {
 
         ModuleConfig moduleConfig = actionConfig.getModuleConfig();
-        ServletActionContext
-        saContext = (ServletActionContext) context;
         String actionsKey = Constants.ACTIONS_KEY + moduleConfig.getPrefix();
-        Map actions = (Map) saContext.getApplicationScope().get(actionsKey);
+        Map actions = (Map) context.getApplicationScope().get(actionsKey);
         if (actions == null) {
             actions = new HashMap();
-            saContext.getApplicationScope().put(actionsKey, actions);
+            context.getApplicationScope().put(actionsKey, actions);
         }
 
         Action action = null;
@@ -67,6 +65,7 @@
             if (action == null) {
                 log.info("Initialize action of type: " + type);
                 action = (Action) ClassUtils.getApplicationInstance(type);
+                ServletActionContext saContext = (ServletActionContext) context;
                 ActionServlet actionServlet = saContext.getActionServlet();
                 action.setServlet(actionServlet);
                 actions.put(type, action);

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateActionForm.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateActionForm.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateActionForm.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/CreateActionForm.java Sun Feb 13 11:26:03 2005
@@ -21,16 +21,11 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.struts.action.ActionForm;
-import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionServlet;
-import org.apache.struts.action.DynaActionForm;
-import org.apache.struts.action.DynaActionFormClass;
-import org.apache.struts.chain.commands.util.ClassUtils;
 import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
 import org.apache.struts.config.ActionConfig;
 import org.apache.struts.config.FormBeanConfig;
-import org.apache.struts.config.ModuleConfig;
 
 public class CreateActionForm extends
         org.apache.struts.chain.commands.AbstractCreateActionForm {
@@ -46,31 +41,10 @@
     protected ActionForm createNewFormInstance(ActionContext actionCtx,
             ActionConfig actionConfig, FormBeanConfig formBeanConfig)
             throws Exception {
-        ActionForm instance;
         log.trace("Make a new instance of: " + formBeanConfig);
-        // Create a new form bean instance
-        if (formBeanConfig.getDynamic()) {
-            ModuleConfig moduleConfig = actionCtx.getModuleConfig();
-            DynaActionFormClass dynaClass =
-                DynaActionFormClass.createDynaActionFormClass(formBeanConfig);
-            instance = (ActionForm) dynaClass.newInstance();
-            ((DynaActionForm) instance).initialize
-                ((ActionMapping) actionConfig);
-        } else {
-            instance = (ActionForm)
-                ClassUtils.getApplicationInstance(formBeanConfig.getType());
-        }
-
-        // Configure and cache the new instance
-        /** @todo Move this dependency on the Servlet API into a subclass and make this one abstract. 
-         * Then again, ActionForm itself depends on the Servlet API.
-         * */
         ServletActionContext saContext = (ServletActionContext) actionCtx;
         ActionServlet servlet = saContext.getActionServlet();
-        instance.setServlet(servlet);
-        actionCtx.setActionForm(instance);
-
-        return instance;
+        return formBeanConfig.createActionForm(servlet);
     }
 
 }

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExceptionHandler.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExceptionHandler.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExceptionHandler.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExceptionHandler.java Sun Feb 13 11:26:03 2005
@@ -20,14 +20,13 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import org.apache.commons.chain.Context;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
-import org.apache.struts.chain.Constants;
 import org.apache.struts.chain.commands.AbstractExceptionHandler;
 import org.apache.struts.chain.commands.util.ClassUtils;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
 import org.apache.struts.config.ActionConfig;
 import org.apache.struts.config.ExceptionConfig;
@@ -46,45 +45,14 @@
 
     // ------------------------------------------------------ Instance Variables
 
-
-    private String actionFormKey = Constants.ACTION_FORM_KEY;
-
     private static final Log log = LogFactory.getLog(ExceptionHandler.class);
 
 
-    // -------------------------------------------------------------- Properties
-
-
-    /**
-     * <p>Return the context attribute key under which the
-     * <code>ActionForm</code> for the currently selected application
-     * action is stored.</p>
-     */
-    public String getActionFormKey() {
-
-        return (this.actionFormKey);
-
-    }
-
-
-    /**
-     * <p>Set the context attribute key under which the
-     * <code>ActionForm</code> for the currently selected application
-     * action is stored.</p>
-     *
-     * @param actionFormKey The new context attribute key
-     */
-    public void setActionFormKey(String actionFormKey) {
-
-        this.actionFormKey = actionFormKey;
-
-    }
-
 
     // ------------------------------------------------------- Protected Methods
 
 
-    protected ForwardConfig handle(Context context,
+    protected ForwardConfig handle(ActionContext context,
                                    Exception exception,
                                    ExceptionConfig exceptionConfig,
                                    ActionConfig actionConfig,
@@ -93,8 +61,7 @@
 
         // Look up the remaining properties needed for this handler
         ServletActionContext sacontext = (ServletActionContext) context;
-        ActionForm actionForm = (ActionForm)
-            sacontext.get(getActionFormKey());
+        ActionForm actionForm = (ActionForm) sacontext.getActionForm();
         HttpServletRequest request = sacontext.getRequest();
         HttpServletResponse response = sacontext.getResponse();
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExecuteAction.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExecuteAction.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExecuteAction.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ExecuteAction.java Sun Feb 13 11:26:03 2005
@@ -17,14 +17,14 @@
 package org.apache.struts.chain.commands.servlet;
 
 
-import org.apache.commons.chain.Context;
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.chain.commands.AbstractExecuteAction;
+import org.apache.struts.chain.contexts.ActionContext;
+import org.apache.struts.chain.contexts.ServletActionContext;
 import org.apache.struts.config.ActionConfig;
 import org.apache.struts.config.ForwardConfig;
-import org.apache.struts.chain.contexts.ServletActionContext;
 
 
 /**
@@ -52,7 +52,7 @@
      *
      * @exception Exception if thrown by the <code>Action</code>
      */
-    protected ForwardConfig execute(Context context,
+    protected ForwardConfig execute(ActionContext context,
                                     Action action,
                                     ActionConfig actionConfig,
                                     ActionForm actionForm)

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformForward.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformForward.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformForward.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformForward.java Sun Feb 13 11:26:03 2005
@@ -20,8 +20,8 @@
 import javax.servlet.RequestDispatcher;
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.commons.chain.Context;
 import org.apache.struts.chain.commands.AbstractPerformForward;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
 import org.apache.struts.config.ForwardConfig;
 import org.apache.struts.config.ModuleConfig;
@@ -49,14 +49,14 @@
      * @param context The context for this request
      * @param forwardConfig The forward to be performed
      */
-    protected void perform(Context context,ForwardConfig forwardConfig)
+    protected void perform(ActionContext context,ForwardConfig forwardConfig)
         throws Exception {
 
         ServletActionContext sacontext = (ServletActionContext) context;
         String forwardPath = forwardConfig.getPath();
         String uri = null;
 
-        ModuleConfig moduleConfig  = (ModuleConfig) context.get(getModuleConfigKey());
+        ModuleConfig moduleConfig  = context.getModuleConfig();
         // Resolve module-relative paths
         if (forwardPath.startsWith("/")) {
             uri = RequestUtils.forwardURL(sacontext.getRequest(),

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformInclude.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformInclude.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformInclude.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/PerformInclude.java Sun Feb 13 11:26:03 2005
@@ -19,9 +19,10 @@
 
 import javax.servlet.RequestDispatcher;
 import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.chain.Context;
-import org.apache.struts.chain.contexts.ServletActionContext;
+
 import org.apache.struts.chain.commands.AbstractPerformInclude;
+import org.apache.struts.chain.contexts.ActionContext;
+import org.apache.struts.chain.contexts.ServletActionContext;
 import org.apache.struts.upload.MultipartRequestWrapper;
 
 
@@ -45,7 +46,7 @@
      * @param context The context for this request
      * @param uri The uri to be included
      */
-    protected void perform(Context context, String uri)
+    protected void perform(ActionContext context, String uri)
         throws Exception {
 
         ServletActionContext swcontext = (ServletActionContext) context;

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/RequestNoCache.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/RequestNoCache.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/RequestNoCache.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/RequestNoCache.java Sun Feb 13 11:26:03 2005
@@ -18,8 +18,8 @@
 
 
 import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.chain.Context;
 import org.apache.struts.chain.commands.AbstractRequestNoCache;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
 
 
@@ -36,7 +36,7 @@
     // ------------------------------------------------------- Protected Methods
 
 
-    protected void requestNoCache(Context context) {
+    protected void requestNoCache(ActionContext context) {
 
         ServletActionContext sacontext = (ServletActionContext) context;
         HttpServletResponse response = sacontext.getResponse();

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectAction.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectAction.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectAction.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectAction.java Sun Feb 13 11:26:03 2005
@@ -18,11 +18,12 @@
 
 
 import javax.servlet.http.HttpServletRequest;
-import org.apache.commons.chain.Context;
-import org.apache.struts.chain.commands.AbstractSelectAction;
+
 import org.apache.struts.chain.Constants;
-import org.apache.struts.config.ModuleConfig;
+import org.apache.struts.chain.commands.AbstractSelectAction;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
+import org.apache.struts.config.ModuleConfig;
 
 
 /**
@@ -38,7 +39,7 @@
     // ------------------------------------------------------- Protected Methods
 
 
-    protected String getPath(Context context) {
+    protected String getPath(ActionContext context) {
 
         ServletActionContext saContext = (ServletActionContext) context;
         HttpServletRequest request = saContext.getRequest();

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectForward.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectForward.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectForward.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectForward.java Sun Feb 13 11:26:03 2005
@@ -17,9 +17,9 @@
 package org.apache.struts.chain.commands.servlet;
 
 
-import org.apache.commons.chain.Context;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.chain.commands.AbstractSelectForward;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.config.ForwardConfig;
 import org.apache.struts.config.ModuleConfig;
 
@@ -45,7 +45,7 @@
      * @param moduleConfig The <code>ModuleConfig</code> for this request
      * @param uri The module-relative URI to be the destination
      */
-    protected ForwardConfig forward(Context context,
+    protected ForwardConfig forward(ActionContext context,
                                     ModuleConfig moduleConfig,
                                     String uri) {
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectInput.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectInput.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectInput.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectInput.java Sun Feb 13 11:26:03 2005
@@ -17,9 +17,9 @@
 package org.apache.struts.chain.commands.servlet;
 
 
-import org.apache.commons.chain.Context;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.chain.commands.AbstractSelectInput;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.config.ForwardConfig;
 import org.apache.struts.config.ModuleConfig;
 
@@ -46,7 +46,7 @@
      * @param moduleConfig The <code>ModuleConfig</code> for this request
      * @param uri The module-relative URI to be the destination
      */
-    protected ForwardConfig forward(Context context,
+    protected ForwardConfig forward(ActionContext context,
                                     ModuleConfig moduleConfig,
                                     String uri) {
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectLocale.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectLocale.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectLocale.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectLocale.java Sun Feb 13 11:26:03 2005
@@ -18,13 +18,15 @@
 
 
 import java.util.Locale;
+
 import javax.servlet.http.HttpSession;
-import org.apache.commons.chain.Context;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.struts.Globals;
 import org.apache.struts.chain.commands.AbstractSelectLocale;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.logging.Log;
 
 
 /**
@@ -46,7 +48,7 @@
      *
      * @param context The <code>Context</code> for this request
      */
-    protected Locale getLocale(Context context) {
+    protected Locale getLocale(ActionContext context) {
 
         ServletActionContext saContext = (ServletActionContext) context;
 

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectModule.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectModule.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectModule.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SelectModule.java Sun Feb 13 11:26:03 2005
@@ -19,10 +19,10 @@
 
 import javax.servlet.http.HttpServletRequest;
 
-import org.apache.commons.chain.Context;
 import org.apache.struts.Globals;
 import org.apache.struts.chain.Constants;
 import org.apache.struts.chain.commands.AbstractSelectModule;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
 
 
@@ -41,7 +41,7 @@
     // ------------------------------------------------------- Protected Methods
 
 
-    protected String getPrefix(Context context) {
+    protected String getPrefix(ActionContext context) {
 
         // Identify the URI from which we will match a module prefix
         ServletActionContext sacontext = (ServletActionContext) context;

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SetContentType.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SetContentType.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SetContentType.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/SetContentType.java Sun Feb 13 11:26:03 2005
@@ -18,8 +18,9 @@
 
 
 import javax.servlet.http.HttpServletResponse;
-import org.apache.commons.chain.Context;
+
 import org.apache.struts.chain.commands.AbstractSetContentType;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
 
 
@@ -37,7 +38,7 @@
     // ------------------------------------------------------- Protected Methods
 
 
-    protected void setContentType(Context context, String contentType) {
+    protected void setContentType(ActionContext context, String contentType) {
 
         ServletActionContext swcontext = (ServletActionContext) context;
         HttpServletResponse response = swcontext.getResponse();

Modified: struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ValidateActionForm.java
URL: http://svn.apache.org/viewcvs/struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ValidateActionForm.java?view=diff&r1=153657&r2=153658
==============================================================================
--- struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ValidateActionForm.java (original)
+++ struts/core/trunk/src/share/org/apache/struts/chain/commands/servlet/ValidateActionForm.java Sun Feb 13 11:26:03 2005
@@ -17,13 +17,13 @@
 package org.apache.struts.chain.commands.servlet;
 
 
-import org.apache.commons.chain.Context;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.chain.commands.AbstractValidateActionForm;
+import org.apache.struts.chain.contexts.ActionContext;
 import org.apache.struts.chain.contexts.ServletActionContext;
 import org.apache.struts.config.ActionConfig;
 
@@ -58,7 +58,7 @@
      * @param context The context for this request
      * @param actionForm The form bean for this request
      */
-    protected ActionErrors validate(Context context,
+    protected ActionErrors validate(ActionContext context,
                                     ActionConfig actionConfig,
                                     ActionForm actionForm) {
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org