You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by cr...@locus.apache.org on 2000/06/16 09:12:20 UTC

cvs commit: jakarta-struts/web/example/WEB-INF action.xml web.xml

craigmcc    00/06/16 00:12:19

  Modified:    src/example/org/apache/struts/example
                        EditRegistrationAction.java
                        EditSubscriptionAction.java LogoffAction.java
                        LogonAction.java SaveRegistrationAction.java
                        SaveSubscriptionAction.java
               src/share/org/apache/struts/action Action.java
                        ActionBase.java ActionMapping.java
                        ActionMappingBase.java ActionServlet.java
               web/example/WEB-INF action.xml web.xml
  Added:       src/share/org/apache/struts/action ActionForward.java
  Log:
  Add the ActionForward class, which represents a path to which control
  should be forwarded, or redirected, by the controller servlet.
  
  Modfiy Action.perform() to return an ActionForward() entry, typically
  configured for this <action> in the XML configuration file.
  
  Modify ActionServlet to respect the value returned by the perform()
  method of the called Action class.
  
  Modify the example application to use the new technique for registering
  any number of logically named <forward> entries, for use in determining
  the next stage of the user interface dynamically.
  
  Revision  Changes    Path
  1.3       +15 -21    jakarta-struts/src/example/org/apache/struts/example/EditRegistrationAction.java
  
  Index: EditRegistrationAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/EditRegistrationAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EditRegistrationAction.java	2000/06/16 01:32:21	1.2
  +++ EditRegistrationAction.java	2000/06/16 07:12:16	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/EditRegistrationAction.java,v 1.2 2000/06/16 01:32:21 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/06/16 01:32:21 $
  + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/EditRegistrationAction.java,v 1.3 2000/06/16 07:12:16 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/06/16 07:12:16 $
    *
    * ====================================================================
    *
  @@ -73,6 +73,7 @@
   import javax.servlet.http.HttpServletResponse;
   import org.apache.struts.action.ActionBase;
   import org.apache.struts.action.ActionForm;
  +import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
  @@ -84,7 +85,7 @@
    * User (if any).
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/06/16 01:32:21 $
  + * @version $Revision: 1.3 $ $Date: 2000/06/16 07:12:16 $
    */
   
   public final class EditRegistrationAction extends ActionBase {
  @@ -96,6 +97,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -106,14 +110,13 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public void perform(ActionServlet servlet,
  -			ActionMapping mapping,
  -			ActionForm form,
  -			HttpServletRequest request,
  -			HttpServletResponse response)
  +    public ActionForward perform(ActionServlet servlet,
  +				 ActionMapping mapping,
  +				 ActionForm form,
  +				 HttpServletRequest request,
  +				 HttpServletResponse response)
   	throws IOException, ServletException {
   
  -
   	// Extract attributes we will need
   	Locale locale = getLocale(request);
   	MessageResources messages = getResources(servlet);
  @@ -130,11 +133,7 @@
   		if (servlet.getDebug() >= 1)
   		    servlet.log("EditRegistrationAction: User is not logged on in session "
   	                        + session.getId());
  -	        String uri = Constants.LOGON_PAGE;
  -	        RequestDispatcher rd =
  -	          servlet.getServletContext().getRequestDispatcher(uri);
  -	        rd.forward(request, response);
  -	        return;
  +		return (mapping.findForward("logon"));
   	    }
   	}
   
  @@ -155,12 +154,7 @@
   	}
   
   	// Forward control to the edit user registration page
  -	String uri = ((ApplicationMapping) mapping).getSuccess();
  -	if (servlet.getDebug() >= 1)
  -	    servlet.log("EditRegistrationAction:  Forwarding to '" + uri + "'");
  -	RequestDispatcher rd =
  -	  servlet.getServletContext().getRequestDispatcher(uri);
  -	rd.forward(request, response);
  +	return (mapping.findForward("success"));
   
       }
   
  
  
  
  1.3       +16 -26    jakarta-struts/src/example/org/apache/struts/example/EditSubscriptionAction.java
  
  Index: EditSubscriptionAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/EditSubscriptionAction.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EditSubscriptionAction.java	2000/06/16 01:32:21	1.2
  +++ EditSubscriptionAction.java	2000/06/16 07:12:16	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/EditSubscriptionAction.java,v 1.2 2000/06/16 01:32:21 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/06/16 01:32:21 $
  + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/EditSubscriptionAction.java,v 1.3 2000/06/16 07:12:16 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/06/16 07:12:16 $
    *
    * ====================================================================
    *
  @@ -73,6 +73,7 @@
   import javax.servlet.http.HttpServletResponse;
   import org.apache.struts.action.ActionBase;
   import org.apache.struts.action.ActionForm;
  +import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
  @@ -83,7 +84,7 @@
    * <code>SubscriptionForm</code> from the currently specified subscription.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/06/16 01:32:21 $
  + * @version $Revision: 1.3 $ $Date: 2000/06/16 07:12:16 $
    */
   
   public final class EditSubscriptionAction extends ActionBase {
  @@ -95,6 +96,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -105,14 +109,13 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public void perform(ActionServlet servlet,
  -			ActionMapping mapping,
  -			ActionForm form,
  -			HttpServletRequest request,
  -			HttpServletResponse response)
  +    public ActionForward perform(ActionServlet servlet,
  +				 ActionMapping mapping,
  +				 ActionForm form,
  +				 HttpServletRequest request,
  +				 HttpServletResponse response)
   	throws IOException, ServletException {
   
  -
   	// Extract attributes we will need
   	Locale locale = getLocale(request);
   	MessageResources messages = getResources(servlet);
  @@ -128,11 +131,7 @@
   	    if (servlet.getDebug() >= 1)
   	        servlet.log("EditSubscriptionAction: User is not logged on in session "
   	                    + session.getId());
  -	    String uri = Constants.LOGON_PAGE;
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  +	    return (mapping.findForward("logon"));
   	}
   
   	// Identify the relevant subscription
  @@ -147,11 +146,7 @@
   	    if (servlet.getDebug() >= 1)
   		servlet.log("EditSubscriptionAction: No subscription for user " +
   			    user.getUsername() + " and host " + host);
  -	    String uri = ((ApplicationMapping) mapping).getFailure();
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  +	    return (mapping.findForward("failure"));
   	}
   	session.setAttribute(Constants.SUBSCRIPTION_KEY, subscription);
   
  @@ -168,12 +163,7 @@
   	subform.setType(subscription.getType());
   
   	// Forward control to the edit subscription page
  -	String uri = ((ApplicationMapping) mapping).getSuccess();
  -	if (servlet.getDebug() >= 1)
  -	    servlet.log("EditSubscriptionAction:  Forwarding to '" + uri + "'");
  -	RequestDispatcher rd =
  -	  servlet.getServletContext().getRequestDispatcher(uri);
  -	rd.forward(request, response);
  +	return (mapping.findForward("success"));
   
       }
   
  
  
  
  1.2       +13 -13    jakarta-struts/src/example/org/apache/struts/example/LogoffAction.java
  
  Index: LogoffAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/LogoffAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LogoffAction.java	2000/05/31 22:28:14	1.1
  +++ LogoffAction.java	2000/06/16 07:12:16	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/LogoffAction.java,v 1.1 2000/05/31 22:28:14 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/05/31 22:28:14 $
  + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/LogoffAction.java,v 1.2 2000/06/16 07:12:16 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/06/16 07:12:16 $
    *
    * ====================================================================
    *
  @@ -74,6 +74,7 @@
   import javax.servlet.http.HttpServletResponse;
   import org.apache.struts.action.ActionBase;
   import org.apache.struts.action.ActionForm;
  +import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
  @@ -84,7 +85,7 @@
    * user logoff.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/05/31 22:28:14 $
  + * @version $Revision: 1.2 $ $Date: 2000/06/16 07:12:16 $
    */
   
   public final class LogoffAction extends ActionBase {
  @@ -96,6 +97,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -106,14 +110,13 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public void perform(ActionServlet servlet,
  -			ActionMapping mapping,
  -			ActionForm form,
  -			HttpServletRequest request,
  -			HttpServletResponse response)
  +    public ActionForward perform(ActionServlet servlet,
  +				 ActionMapping mapping,
  +				 ActionForm form,
  +				 HttpServletRequest request,
  +				 HttpServletResponse response)
   	throws IOException, ServletException {
   
  -
   	// Extract attributes we will need
   	Locale locale = getLocale(request);
   	MessageResources messages = getResources(servlet);
  @@ -135,10 +138,7 @@
   	session.invalidate();
   
   	// Forward control to the specified success URI
  -	String uri = ((ApplicationMapping) mapping).getSuccess();
  -	RequestDispatcher rd =
  -	  servlet.getServletContext().getRequestDispatcher(uri);
  -	rd.forward(request, response);
  +	return (mapping.findForward("success"));
   
       }
   
  
  
  
  1.4       +15 -20    jakarta-struts/src/example/org/apache/struts/example/LogonAction.java
  
  Index: LogonAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/LogonAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LogonAction.java	2000/06/16 01:32:21	1.3
  +++ LogonAction.java	2000/06/16 07:12:16	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/LogonAction.java,v 1.3 2000/06/16 01:32:21 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/06/16 01:32:21 $
  + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/LogonAction.java,v 1.4 2000/06/16 07:12:16 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/06/16 07:12:16 $
    *
    * ====================================================================
    *
  @@ -74,6 +74,7 @@
   import javax.servlet.http.HttpServletResponse;
   import org.apache.struts.action.ActionBase;
   import org.apache.struts.action.ActionForm;
  +import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
  @@ -83,7 +84,7 @@
    * Implementation of <strong>Action</strong> that validates a user logon.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/06/16 01:32:21 $
  + * @version $Revision: 1.4 $ $Date: 2000/06/16 07:12:16 $
    */
   
   public final class LogonAction extends ActionBase {
  @@ -95,6 +96,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -105,14 +109,13 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public void perform(ActionServlet servlet,
  -			ActionMapping mapping,
  -			ActionForm form,
  -			HttpServletRequest request,
  -			HttpServletResponse response)
  +    public ActionForward perform(ActionServlet servlet,
  +				 ActionMapping mapping,
  +				 ActionForm form,
  +				 HttpServletRequest request,
  +				 HttpServletResponse response)
   	throws IOException, ServletException {
   
  -
   	// Extract attributes we will need
   	Locale locale = getLocale(request);
   	MessageResources messages = getResources(servlet);
  @@ -137,11 +140,7 @@
   	// Report any errors we have discovered back to the original form
   	if (errors.size() > 0) {
   	    saveErrors(request, errors);
  -	    String uri = mapping.getInputForm();
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  +	    return (new ActionForward(mapping.getInputForm()));
   	}
   
   	// Save our logged-in user in the session
  @@ -152,11 +151,7 @@
   	                "' logged on in session " + session.getId());
   
   	// Forward control to the specified success URI
  -	String uri = ((ApplicationMapping) mapping).getSuccess();
  -	RequestDispatcher rd =
  -	  servlet.getServletContext().getRequestDispatcher(uri);
  -	rd.forward(request, response);
  -
  +	return (mapping.findForward("success"));
   
       }
   
  
  
  
  1.4       +18 -32    jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java
  
  Index: SaveRegistrationAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SaveRegistrationAction.java	2000/06/16 01:32:22	1.3
  +++ SaveRegistrationAction.java	2000/06/16 07:12:16	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java,v 1.3 2000/06/16 01:32:22 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/06/16 01:32:22 $
  + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveRegistrationAction.java,v 1.4 2000/06/16 07:12:16 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/06/16 07:12:16 $
    *
    * ====================================================================
    *
  @@ -74,6 +74,7 @@
   import javax.servlet.http.HttpServletResponse;
   import org.apache.struts.action.ActionBase;
   import org.apache.struts.action.ActionForm;
  +import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
  @@ -85,7 +86,7 @@
    * created, the user is also implicitly logged on.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/06/16 01:32:22 $
  + * @version $Revision: 1.4 $ $Date: 2000/06/16 07:12:16 $
    */
   
   public final class SaveRegistrationAction extends ActionBase {
  @@ -97,6 +98,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -107,14 +111,13 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public void perform(ActionServlet servlet,
  -			ActionMapping mapping,
  -			ActionForm form,
  -			HttpServletRequest request,
  -			HttpServletResponse response)
  +    public ActionForward perform(ActionServlet servlet,
  +				 ActionMapping mapping,
  +				 ActionForm form,
  +				 HttpServletRequest request,
  +				 HttpServletResponse response)
   	throws IOException, ServletException {
   
  -
   	// Extract attributes and parameters we will need
   	Locale locale = getLocale(request);
   	MessageResources messages = getResources(servlet);
  @@ -128,13 +131,8 @@
   
   	// Is there a currently logged on user (unless creating)?
   	User user = (User) session.getAttribute(Constants.USER_KEY);
  -	if (!"Create".equals(action) && (user == null)) {
  -	    String uri = Constants.LOGON_PAGE;
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  -	}
  +	if (!"Create".equals(action) && (user == null))
  +	    return (mapping.findForward("logon"));
   
   	// Was this transaction cancelled?
   	String submit = request.getParameter("submit");
  @@ -147,11 +145,7 @@
   	    if (mapping.getFormAttribute() != null)
   	        session.removeAttribute(mapping.getFormAttribute());
   	    session.removeAttribute(Constants.SUBSCRIPTION_KEY);
  -	    String uri = ((ApplicationMapping) mapping).getSuccess();
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  +	    return (mapping.findForward("success"));
   	}
   
   	// All required validations were done in the form bean
  @@ -175,11 +169,7 @@
   	// Report any errors we have discovered back to the original form
   	if (errors.size() > 0) {
   	    saveErrors(request, errors);
  -	    String uri = mapping.getInputForm();
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  +	    return (new ActionForward(mapping.getInputForm()));
   	}
   
   	// Update the user's persistent profile information
  @@ -215,11 +205,7 @@
   	    session.removeAttribute(mapping.getFormAttribute());
   
   	// Forward control to the specified success URI
  -	String uri = ((ApplicationMapping) mapping).getSuccess();
  -	RequestDispatcher rd =
  -	  servlet.getServletContext().getRequestDispatcher(uri);
  -	rd.forward(request, response);
  -
  +	return (mapping.findForward("success"));
   
       }
   
  
  
  
  1.4       +19 -33    jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java
  
  Index: SaveSubscriptionAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SaveSubscriptionAction.java	2000/06/16 01:32:22	1.3
  +++ SaveSubscriptionAction.java	2000/06/16 07:12:16	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java,v 1.3 2000/06/16 01:32:22 craigmcc Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/06/16 01:32:22 $
  + * $Header: /home/cvs/jakarta-struts/src/example/org/apache/struts/example/SaveSubscriptionAction.java,v 1.4 2000/06/16 07:12:16 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2000/06/16 07:12:16 $
    *
    * ====================================================================
    *
  @@ -74,6 +74,7 @@
   import javax.servlet.http.HttpServletResponse;
   import org.apache.struts.action.ActionBase;
   import org.apache.struts.action.ActionForm;
  +import org.apache.struts.action.ActionForward;
   import org.apache.struts.action.ActionMapping;
   import org.apache.struts.action.ActionServlet;
   import org.apache.struts.util.MessageResources;
  @@ -84,7 +85,7 @@
    * the mail subscription entered by the user.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.3 $ $Date: 2000/06/16 01:32:22 $
  + * @version $Revision: 1.4 $ $Date: 2000/06/16 07:12:16 $
    */
   
   public final class SaveSubscriptionAction extends ActionBase {
  @@ -96,6 +97,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -106,14 +110,13 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public void perform(ActionServlet servlet,
  -			ActionMapping mapping,
  -			ActionForm form,
  -			HttpServletRequest request,
  -			HttpServletResponse response)
  +    public ActionForward perform(ActionServlet servlet,
  +				 ActionMapping mapping,
  +				 ActionForm form,
  +				 HttpServletRequest request,
  +				 HttpServletResponse response)
   	throws IOException, ServletException {
   
  -
   	// Extract attributes and parameters we will need
   	Locale locale = getLocale(request);
   	MessageResources messages = getResources(servlet);
  @@ -125,13 +128,8 @@
   
   	// Is there a currently logged on user?
   	User user = (User) session.getAttribute(Constants.USER_KEY);
  -	if (user == null) {
  -	    String uri = Constants.LOGON_PAGE;
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  -	}
  +	if (user == null)
  +	    return (mapping.findForward("logon"));
   
   	// Is there a related Subscription object?
   	Subscription subscription =
  @@ -142,7 +140,7 @@
   	                 user.getUsername() + "'");
   	    response.sendError(HttpServletResponse.SC_BAD_REQUEST,
   	                       messages.getMessage("error.noSubscription"));
  -	    return;
  +	    return (null);
   	}
   
   	// Was this transaction cancelled?
  @@ -156,11 +154,7 @@
   	    if (mapping.getFormAttribute() != null)
   	        session.removeAttribute(mapping.getFormAttribute());
   	    session.removeAttribute(Constants.SUBSCRIPTION_KEY);
  -	    String uri = ((ApplicationMapping) mapping).getSuccess();
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  +	    return (mapping.findForward("success"));
   	}
   
   	// Was this transaction a Delete?
  @@ -174,11 +168,7 @@
   	    if (mapping.getFormAttribute() != null)
   	        session.removeAttribute(mapping.getFormAttribute());
   	    session.removeAttribute(Constants.SUBSCRIPTION_KEY);
  -	    String uri = ((ApplicationMapping) mapping).getSuccess();
  -	    RequestDispatcher rd =
  -	      servlet.getServletContext().getRequestDispatcher(uri);
  -	    rd.forward(request, response);
  -	    return;
  +	    return (mapping.findForward("success"));
   	}
   
   	// All required validations were done by the form itself
  @@ -199,11 +189,7 @@
   	session.removeAttribute(Constants.SUBSCRIPTION_KEY);
   
   	// Forward control to the specified success URI
  -	String uri = ((ApplicationMapping) mapping).getSuccess();
  -	RequestDispatcher rd =
  -	  servlet.getServletContext().getRequestDispatcher(uri);
  -	rd.forward(request, response);
  -
  +	return (mapping.findForward("success"));
   
       }
   
  
  
  
  1.2       +11 -8     jakarta-struts/src/share/org/apache/struts/action/Action.java
  
  Index: Action.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/Action.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Action.java	2000/05/31 22:28:11	1.1
  +++ Action.java	2000/06/16 07:12:17	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/Action.java,v 1.1 2000/05/31 22:28:11 craigmcc Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/05/31 22:28:11 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/Action.java,v 1.2 2000/06/16 07:12:17 craigmcc Exp $
  + * $Revision: 1.2 $
  + * $Date: 2000/06/16 07:12:17 $
    *
    * ====================================================================
    *
  @@ -90,7 +90,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.1 $ $Date: 2000/05/31 22:28:11 $
  + * @version $Revision: 1.2 $ $Date: 2000/06/16 07:12:17 $
    */
   
   public interface Action {
  @@ -134,6 +134,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -144,11 +147,11 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public void perform(ActionServlet servlet,
  -			ActionMapping mapping,
  -			ActionForm form,
  -			HttpServletRequest request,
  -			HttpServletResponse response)
  +    public ActionForward perform(ActionServlet servlet,
  +				 ActionMapping mapping,
  +				 ActionForm form,
  +				 HttpServletRequest request,
  +				 HttpServletResponse response)
   	throws IOException, ServletException;
   
   
  
  
  
  1.3       +12 -9     jakarta-struts/src/share/org/apache/struts/action/ActionBase.java
  
  Index: ActionBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionBase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ActionBase.java	2000/06/15 18:00:05	1.2
  +++ ActionBase.java	2000/06/16 07:12:18	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionBase.java,v 1.2 2000/06/15 18:00:05 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/06/15 18:00:05 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionBase.java,v 1.3 2000/06/16 07:12:18 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/06/16 07:12:18 $
    *
    * ====================================================================
    *
  @@ -78,7 +78,7 @@
    * useful utility methods for use by Action classes.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/06/15 18:00:05 $
  + * @version $Revision: 1.3 $ $Date: 2000/06/16 07:12:18 $
    */
   
   public abstract class ActionBase implements Action {
  @@ -99,6 +99,9 @@
       /**
        * Process the specified HTTP request, and create the corresponding HTTP
        * response (or forward to another web component that will create it).
  +     * Return an <code>ActionForward</code> instance describing where and how
  +     * control should be forwarded, or <code>null</code> if the response has
  +     * already been completed.
        *
        * @param servlet The ActionServlet making this request
        * @param mapping The ActionMapping used to select this instance
  @@ -109,11 +112,11 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet exception occurs
        */
  -    public abstract void perform(ActionServlet servlet,
  -				 ActionMapping mapping,
  -				 ActionForm form,
  -				 HttpServletRequest request,
  -				 HttpServletResponse response)
  +    public abstract ActionForward perform(ActionServlet servlet,
  +					  ActionMapping mapping,
  +					  ActionForm form,
  +					  HttpServletRequest request,
  +					  HttpServletResponse response)
   	throws IOException, ServletException;
   
   
  
  
  
  1.3       +21 -4     jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java
  
  Index: ActionMapping.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ActionMapping.java	2000/06/16 01:32:23	1.2
  +++ ActionMapping.java	2000/06/16 07:12:18	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java,v 1.2 2000/06/16 01:32:23 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/06/16 01:32:23 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMapping.java,v 1.3 2000/06/16 07:12:18 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/06/16 07:12:18 $
    *
    * ====================================================================
    *
  @@ -97,7 +97,7 @@
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/06/16 01:32:23 $
  + * @version $Revision: 1.3 $ $Date: 2000/06/16 07:12:18 $
    */
   
   public interface ActionMapping {
  @@ -208,6 +208,14 @@
   
   
       /**
  +     * Add a new <code>ActionForward</code> associated with this mapping.
  +     *
  +     * @param forward The ActionForward to be added
  +     */
  +    public void addForward(ActionForward forward);
  +
  +
  +    /**
        * Return an initialized instance of our Action class for this mapping.
        * If instantiation fails for any reason, <code>null</code> is returned.
        */
  @@ -219,6 +227,15 @@
        * instantiation fails for any reason, <code>null</code> is returned.
        */
       public ActionForm createFormInstance();
  +
  +
  +    /**
  +     * Return the <code>ActionForward</code> with the specified name,
  +     * if any; otherwise return <code>null</code>.
  +     *
  +     * @param name Name of the forward entry to be returned
  +     */
  +    public ActionForward findForward(String name);
   
   
   }
  
  
  
  1.3       +39 -4     jakarta-struts/src/share/org/apache/struts/action/ActionMappingBase.java
  
  Index: ActionMappingBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMappingBase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ActionMappingBase.java	2000/06/16 01:32:23	1.2
  +++ ActionMappingBase.java	2000/06/16 07:12:18	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMappingBase.java,v 1.2 2000/06/16 01:32:23 craigmcc Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/06/16 01:32:23 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionMappingBase.java,v 1.3 2000/06/16 07:12:18 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/06/16 07:12:18 $
    *
    * ====================================================================
    *
  @@ -63,13 +63,16 @@
   package org.apache.struts.action;
   
   
  +import java.util.Hashtable;
  +
  +
   /**
    * A minimal implementation of <strong>ActionMapping</strong> that contains
    * only the required properties.  Additional properties can be provided by
    * subclassing this class and adding new "getter" and "setter" methods.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.2 $ $Date: 2000/06/16 01:32:23 $
  + * @version $Revision: 1.3 $ $Date: 2000/06/16 07:12:18 $
    */
   
   public class ActionMappingBase implements ActionMapping {
  @@ -126,6 +129,13 @@
   
   
       /**
  +     * The set of <code>ActionForward</code> instances associated with
  +     * this <code>ActionMapping</code>.
  +     */
  +    protected Hashtable forwards = new Hashtable();
  +
  +
  +    /**
        * The input form URI for this mapping.
        */
       protected String inputForm = null;
  @@ -299,6 +309,18 @@
   
   
       /**
  +     * Add a new <code>ActionForward</code> associated with this mapping.
  +     *
  +     * @param forward The ActionForward to be added
  +     */
  +    public void addForward(ActionForward forward) {
  +
  +	forwards.put(forward.getName(), forward);
  +
  +    }
  +
  +
  +    /**
        * Return an initialized instance of our Action class for this mapping.
        */
       public Action createActionInstance() {
  @@ -335,6 +357,19 @@
   	    formInstance = null;
   	}
   	return (formInstance);
  +
  +    }
  +
  +
  +    /**
  +     * Return the <code>ActionForward</code> with the specified name,
  +     * if any; otherwise return <code>null</code>.
  +     *
  +     * @param name Name of the forward entry to be returned
  +     */
  +    public ActionForward findForward(String name) {
  +
  +	return ((ActionForward) forwards.get(name));
   
       }
   
  
  
  
  1.8       +40 -6     jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java
  
  Index: ActionServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ActionServlet.java	2000/06/16 01:32:23	1.7
  +++ ActionServlet.java	2000/06/16 07:12:18	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v 1.7 2000/06/16 01:32:23 craigmcc Exp $
  - * $Revision: 1.7 $
  - * $Date: 2000/06/16 01:32:23 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v 1.8 2000/06/16 07:12:18 craigmcc Exp $
  + * $Revision: 1.8 $
  + * $Date: 2000/06/16 07:12:18 $
    *
    * ====================================================================
    *
  @@ -146,12 +146,14 @@
    *     containing our configuration information.  [/WEB-INF/action.xml]
    * <li><strong>debug</strong> - The debugging detail level for this
    *     servlet, which controls how much information is logged.  [0]
  + * <li><strong>forward</strong> - The Java class name of the ActionForward
  + *     implementation to use [org.apache.struts.action.ActionForward]
    * <li><strong>mapping</strong> - The Java class name of the ActionMapping
    *     implementation to use [org.apache.struts.action.ActionMappingBase]
    * </ul>
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.7 $ $Date: 2000/06/16 01:32:23 $
  + * @version $Revision: 1.8 $ $Date: 2000/06/16 07:12:18 $
    */
   
   public class ActionServlet
  @@ -168,6 +170,13 @@
   
   
       /**
  +     * The Java class name of the ActionForward implementation class to use.
  +     */
  +    protected String forwardClass =
  +	"org.apache.struts.action.ActionForward";
  +
  +
  +    /**
        * The resources object for our internal resources.
        */
       protected MessageResources internal = null;
  @@ -438,6 +447,11 @@
   
   	String value = null;
   
  +	// Initialize the name of our ActionForward implementation class
  +	value = getServletConfig().getInitParameter("forward");
  +	if (value != null)
  +	    forwardClass = value;
  +
   	// Initialize the name of our ActionMapping implementation class
   	value = getServletConfig().getInitParameter("mapping");
   	if (value != null)
  @@ -465,6 +479,12 @@
   	digester.addSetProperties("action-mappings/action");
   	digester.addSetNext("action-mappings/action", "addMapping",
   			    "org.apache.struts.action.ActionMapping");
  +	digester.addObjectCreate("action-mappings/action/forward",
  +				 forwardClass);
  +	digester.addSetProperties("action-mappings/action/forward");
  +	digester.addSetNext("action-mappings/action/forward", "addForward",
  +			    "org.apache.struts.action.ActionForward");
  +
   
   	// Parse the input stream to configure our mappings
   	try {
  @@ -589,6 +609,7 @@
   					 HttpServletResponse response)
   	throws IOException, ServletException {
   
  +	// Identify the action class we will be using
   	Action actionInstance = mapping.createActionInstance();
   	if (actionInstance == null) {
   	    if (debug >= 1)
  @@ -598,9 +619,22 @@
   			       internal.getMessage("actionCreate",
   						   mapping.getPath()));
   	    return;
  +	}
  +
  +	// Perform the requested action
  +	ActionForward forward =
  +	    actionInstance.perform(this, mapping, formInstance,
  +				   request, response);
  +	if (forward != null) {
  +	    String path = forward.getPath();
  +	    if (forward.getRedirect())
  +		response.sendRedirect(path);
  +	    else {
  +		RequestDispatcher rd =
  +		    getServletContext().getRequestDispatcher(path);
  +		rd.forward(request, response);
  +	    }
   	}
  -	actionInstance.perform(this, mapping, formInstance,
  -			       request, response);
   
       }
   
  
  
  
  1.1                  jakarta-struts/src/share/org/apache/struts/action/ActionForward.java
  
  Index: ActionForward.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionForward.java,v 1.1 2000/06/16 07:12:18 craigmcc Exp $
   * $Revision: 1.1 $
   * $Date: 2000/06/16 07:12:18 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   */
  
  
  package org.apache.struts.action;
  
  
  /**
   * An <strong>ActionForward</strong> represents a destination to which the
   * controller servlet, <code>ActionServlet</code>, might be directed to
   * perform a <code>RequestDispatcher.forward()</code> or
   * <code>HttpServletResponse.sendRedirect()</code> to, as a result of
   * processing activities of an <code>Action</code> class.  Instances of this
   * class may be created dynamically as necessary, or configured in association
   * with an <code>ActionMapping</code> instance for named lookup of potentially
   * multiple destinations for a particular mapping instance.
   * <p>
   * An <code>ActionForward</code> has the following minimal set of properties.
   * Additional properties can be provided as needed by subclassses.
   * <ul>
   * <li><strong>name</strong> - Logical name by which this instance may be
   *     looked up in relationship to a particular <code>ActionMapping</code>.
   * <li><strong>path</strong> - Context-relative URI to which control should
   *     be forwarded, or an absolute or relative URI to which control should
   *     be redirected.
   * <li><strong>redirect</strong> - Set to <code>true</code> if the controller
   *     servlet should call <code>HttpServletResponse.sendRedirect()</code>
   *     on the associated path; otherwise <code>false</code>.  [false]
   * </ul>
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2000/06/16 07:12:18 $
   */
  
  public class ActionForward {
  
  
      // ----------------------------------------------------------- Constructors
  
  
      /**
       * Construct a new instance with default values.
       */
      public ActionForward() {
  
  	this(null, false);
  
      }
  
  
      /**
       * Construct a new instance with the specified path.
       *
       * @param path Path for this instance
       */
      public ActionForward(String path) {
  
  	this(path, false);
  
      }
  
  
      /**
       * Construct a new instance with the specified path and redirect flag.
       *
       * @param path Path for this instance
       * @param redirect Redirect flag for this instance
       */
      public ActionForward(String path, boolean redirect) {
  
  	super();
  	setPath(path);
  	setRedirect(redirect);
  
      }
  
  
      // ----------------------------------------------------- Instance Variables
  
  
      /**
       * The logical name of this forward.
       */
      private String name = null;
  
  
      /**
       * The context-relative (for a forward) or relative or absolute (for a
       * redirect) URI path to be forwarded to.
       */
      private String path = null;
  
  
      /**
       * Should this be a redirect instead of a forward?
       */
      private boolean redirect = false;
  
  
      // ------------------------------------------------------------- Properties
  
  
      /**
       * Return the name.
       */
      public String getName() {
  
  	return (this.name);
  
      }
  
  
      /**
       * Set the name.
       *
       * @param name The new name
       */
      public void setName(String name) {
  
  	this.name = name;
  
      }
  
  
      /**
       * Return the path.
       */
      public String getPath() {
  
  	return (this.path);
  
      }
  
  
      /**
       * Set the path.
       *
       * @param path The new path
       */
      public void setPath(String path) {
  
  	this.path = path;
  
      }
  
  
      /**
       * Return the redirect flag.
       */
      public boolean getRedirect() {
  
  	return (this.redirect);
  
      }
  
  
      /**
       * Set the redirect flag.
       *
       * @param redirect The new redirect flag
       */
      public void setRedirect(boolean redirect) {
  
  	this.redirect = redirect;
  
      }
  
  
      // --------------------------------------------------------- Public Methods
  
      /**
       * Return a String version of this mapping.
       */
      public String toString() {
  
  	return ("ActionForward[" + name + "]");
  
      }
  
  
  }
  
  
  
  1.3       +46 -40    jakarta-struts/web/example/WEB-INF/action.xml
  
  Index: action.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/action.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- action.xml	2000/06/16 01:32:26	1.2
  +++ action.xml	2000/06/16 07:12:19	1.3
  @@ -3,55 +3,61 @@
   <action-mappings>
   
     <!-- Edit user registration -->
  -  <action   path="/editRegistration"
  -     actionClass="org.apache.struts.example.EditRegistrationAction"
  -   formAttribute="registrationForm"
  -       formClass="org.apache.struts.example.RegistrationForm"
  -         success="/registration.jsp"
  -         failure="/logon.jsp"
  -  />
  +  <action    path="/editRegistration"
  +      actionClass="org.apache.struts.example.EditRegistrationAction"
  +    formAttribute="registrationForm"
  +        formClass="org.apache.struts.example.RegistrationForm">
  +    <forward name="failure"    path="/logon.jsp"/>
  +    <forward name="logon"      path="/logon.jsp"/>
  +    <forward name="success"    path="/registration.jsp"/>
  +  </action>
   
     <!-- Edit mail subscription -->
  -  <action   path="/editSubscription"
  -     actionClass="org.apache.struts.example.EditSubscriptionAction"
  -   formAttribute="subscriptionForm"
  -       formClass="org.apache.struts.example.SubscriptionForm"
  -         success="/subscription.jsp"
  -         failure="/mainMenu.jsp"
  -  />
  +  <action    path="/editSubscription"
  +      actionClass="org.apache.struts.example.EditSubscriptionAction"
  +    formAttribute="subscriptionForm"
  +        formClass="org.apache.struts.example.SubscriptionForm">
  +    <forward name="failure"    path="/mainMenu.jsp"/>
  +    <forward name="logon"      path="/logon.jsp"/>
  +    <forward name="success"    path="/subscription.jsp"/>
  +  </action>
   
     <!-- Process a user logoff -->
  -  <action   path="/logoff"
  -     actionClass="org.apache.struts.example.LogoffAction"
  -         success="/index.jsp"
  -         failure="/index.jsp"
  -  />
  +  <action    path="/logoff"
  +      actionClass="org.apache.struts.example.LogoffAction">
  +    <forward name="failure"    path="/index.jsp"/>
  +    <forward name="logon"      path="/logon.jsp"/>
  +    <forward name="success"    path="/index.jsp"/>
  +  </action>
   
     <!-- Process a user logon -->
  -  <action   path="/logon"
  -     actionClass="org.apache.struts.example.LogonAction"
  -   formAttribute="logonForm"
  -       formClass="org.apache.struts.example.LogonForm"
  -         success="/mainMenu.jsp"
  -       inputForm="/logon.jsp"
  -  />
  +  <action    path="/logon"
  +      actionClass="org.apache.struts.example.LogonAction"
  +    formAttribute="logonForm"
  +        formClass="org.apache.struts.example.LogonForm"
  +        inputForm="/logon.jsp">
  +    <forward name="logon"      path="/logon.jsp"/>
  +    <forward name="success"    path="/mainMenu.jsp"/>
  +  </action>
   
     <!-- Save user registration -->
  -  <action   path="/saveRegistration"
  -     actionClass="org.apache.struts.example.SaveRegistrationAction"
  -   formAttribute="registrationForm"
  -       formClass="org.apache.struts.example.RegistrationForm"
  -         success="/mainMenu.jsp"
  -       inputForm="/registration.jsp"
  -  />
  +  <action    path="/saveRegistration"
  +      actionClass="org.apache.struts.example.SaveRegistrationAction"
  +    formAttribute="registrationForm"
  +        formClass="org.apache.struts.example.RegistrationForm"
  +        inputForm="/registration.jsp">
  +    <forward name="logon"      path="/logon.jsp"/>
  +    <forward name="success"    path="/mainMenu.jsp"/>
  +  </action>
   
     <!-- Save mail subscription -->
  -  <action   path="/saveSubscription"
  -     actionClass="org.apache.struts.example.SaveSubscriptionAction"
  -   formAttribute="subscriptionForm"
  -       formClass="org.apache.struts.example.SubscriptionForm"
  -         success="/editRegistration.do?action=Edit"
  -       inputForm="/subscription.jsp"
  -  />
  +  <action    path="/saveSubscription"
  +      actionClass="org.apache.struts.example.SaveSubscriptionAction"
  +    formAttribute="subscriptionForm"
  +        formClass="org.apache.struts.example.SubscriptionForm"
  +        inputForm="/subscription.jsp">
  +    <forward name="logon"      path="/logon.jsp"/>
  +    <forward name="success"    path="/editRegistration.do?action=Edit"/>
  +  </action>
   
   </action-mappings>
  
  
  
  1.2       +0 -4      jakarta-struts/web/example/WEB-INF/web.xml
  
  Index: web.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/web/example/WEB-INF/web.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- web.xml	2000/05/31 22:28:10	1.1
  +++ web.xml	2000/06/16 07:12:19	1.2
  @@ -35,10 +35,6 @@
         <param-name>debug</param-name>
         <param-value>2</param-value>
       </init-param>
  -    <init-param>
  -      <param-name>mapping</param-name>
  -      <param-value>org.apache.struts.example.ApplicationMapping</param-value>
  -    </init-param>
       <load-on-startup>2</load-on-startup>
     </servlet>