You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by dg...@apache.org on 2003/06/28 08:16:35 UTC

cvs commit: jakarta-struts/src/share/org/apache/struts/action ActionServlet.java Action.java

dgraham     2003/06/27 23:16:35

  Modified:    src/share/org/apache/struts/action ActionServlet.java
                        Action.java
  Log:
  Replaced the last remaining references to Action constants with Globals
  constants.
  
  Revision  Changes    Path
  1.150     +10 -10    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.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- ActionServlet.java	19 Jun 2003 00:11:54 -0000	1.149
  +++ ActionServlet.java	28 Jun 2003 06:16:34 -0000	1.150
  @@ -581,7 +581,7 @@
       public ActionFormBean findFormBean(String name) {
   
           ActionFormBeans afb = (ActionFormBeans)
  -            getServletContext().getAttribute(Action.FORM_BEANS_KEY);
  +            getServletContext().getAttribute(Globals.FORM_BEANS_KEY);
           if (afb == null) {
               return (null);
           }
  @@ -601,7 +601,7 @@
       public ActionForward findForward(String name) {
   
           ActionForwards af = (ActionForwards)
  -            getServletContext().getAttribute(Action.FORWARDS_KEY);
  +            getServletContext().getAttribute(Globals.FORWARDS_KEY);
           if (af == null) {
               return (null);
           }
  @@ -621,7 +621,7 @@
       public ActionMapping findMapping(String path) {
   
           ActionMappings am = (ActionMappings)
  -            getServletContext().getAttribute(Action.MAPPINGS_KEY);
  +            getServletContext().getAttribute(Globals.MAPPINGS_KEY);
           if (am == null) {
               return (null);
           }
  @@ -1570,7 +1570,7 @@
               afb.addFormBean((ActionFormBean) fbcs[i]);
           }
           afb.setFast(true);
  -        getServletContext().setAttribute(Action.FORM_BEANS_KEY, afb);
  +        getServletContext().setAttribute(Globals.FORM_BEANS_KEY, afb);
   
       }
   
  @@ -1595,7 +1595,7 @@
               af.addForward((ActionForward) fcs[i]);
           }
           af.setFast(true);
  -        getServletContext().setAttribute(Action.FORWARDS_KEY, af);
  +        getServletContext().setAttribute(Globals.FORWARDS_KEY, af);
   
       }
   
  @@ -1621,7 +1621,7 @@
               am.addMapping((ActionMapping) acs[i]);
           }
           am.setFast(true);
  -        getServletContext().setAttribute(Action.MAPPINGS_KEY, am);
  +        getServletContext().setAttribute(Globals.MAPPINGS_KEY, am);
   
       }
   
  
  
  
  1.61      +9 -13     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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- Action.java	25 Apr 2003 04:23:28 -0000	1.60
  +++ Action.java	28 Jun 2003 06:16:34 -0000	1.61
  @@ -1,4 +1,3 @@
  -
   /*
    * $Header$
    * $Revision$
  @@ -60,10 +59,8 @@
    *
    */
   
  -
   package org.apache.struts.action;
   
  -
   import java.io.IOException;
   import java.util.Locale;
   
  @@ -82,7 +79,6 @@
   import org.apache.struts.util.RequestUtils;
   import org.apache.struts.util.TokenProcessor;
   
  -
   /**
    * An <strong>Action</strong> is an adapter between the contents of an incoming
    * HTTP request and the corresponding business logic that should be executed to
  @@ -514,7 +510,7 @@
        */
       protected DataSource getDataSource(HttpServletRequest request) {
   
  -        return (getDataSource(request, DATA_SOURCE_KEY));
  +        return (getDataSource(request, Globals.DATA_SOURCE_KEY));
   
       }
   
  @@ -702,12 +698,12 @@
   
           // Remove any error messages attribute if none are required
           if ((errors == null) || errors.isEmpty()) {
  -            request.removeAttribute(ERROR_KEY);
  +            request.removeAttribute(Globals.ERROR_KEY);
               return;
           }
   
           // Save the error messages we need
  -        request.setAttribute(ERROR_KEY, errors);
  +        request.setAttribute(Globals.ERROR_KEY, errors);
   
       }
   
  @@ -727,12 +723,12 @@
   
           // Remove any messages attribute if none are required
           if ((messages == null) || messages.isEmpty()) {
  -            request.removeAttribute(MESSAGE_KEY);
  +            request.removeAttribute(Globals.MESSAGE_KEY);
               return;
           }
   
           // Save the messages we need
  -        request.setAttribute(MESSAGE_KEY, messages);
  +        request.setAttribute(Globals.MESSAGE_KEY, messages);
   
       }
   
  
  
  

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