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...@apache.org on 2002/01/15 19:51:27 UTC

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

craigmcc    02/01/15 10:51:26

  Modified:    src/share/org/apache/struts/action ActionServlet.java
  Log:
  Refactor the common doGet() and doPost() logic (again) into a common
  process() method.
  
  Submitted by:  Donnie Hale <do...@haleonline.net>
  
  Revision  Changes    Path
  1.85      +27 -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.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- ActionServlet.java	13 Jan 2002 04:21:18 -0000	1.84
  +++ ActionServlet.java	15 Jan 2002 18:51:26 -0000	1.85
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v 1.84 2002/01/13 04:21:18 craigmcc Exp $
  - * $Revision: 1.84 $
  - * $Date: 2002/01/13 04:21:18 $
  + * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/action/ActionServlet.java,v 1.85 2002/01/15 18:51:26 craigmcc Exp $
  + * $Revision: 1.85 $
  + * $Date: 2002/01/15 18:51:26 $
    *
    * ====================================================================
    *
  @@ -265,7 +265,7 @@
    *
    * @author Craig R. McClanahan
    * @author Ted Husted
  - * @version $Revision: 1.84 $ $Date: 2002/01/13 04:21:18 $
  + * @version $Revision: 1.85 $ $Date: 2002/01/15 18:51:26 $
    */
   
   public class ActionServlet
  @@ -434,9 +434,7 @@
                 HttpServletResponse response)
           throws IOException, ServletException {
   
  -        RequestUtils.selectApplication(request, getServletContext());
  -        getApplicationConfig(request).getProcessor().process
  -            (request, response);
  +        process(request, response);
   
       }
   
  @@ -454,9 +452,7 @@
                  HttpServletResponse response)
           throws IOException, ServletException {
   
  -        RequestUtils.selectApplication(request, getServletContext());
  -        getApplicationConfig(request).getProcessor().process
  -            (request, response);
  +        process(request, response);
   
       }
   
  @@ -1010,6 +1006,27 @@
           if (servletMapping != null)
               getServletContext().setAttribute(Action.SERVLET_KEY,
                                                servletMapping);
  +
  +    }
  +
  +
  +    /**
  +     * Perform the standard request processing for this request, and create
  +     * the corresponding response.
  +     *
  +     * @param request The servlet request we are processing
  +     * @param response The servlet response we are creating
  +     *
  +     * @exception IOException if an input/output error occurs
  +     * @exception ServletException if a servlet exception is thrown
  +     */
  +    protected void process(HttpServletRequest request,
  +                           HttpServletResponse response)
  +        throws IOException, ServletException {
  +
  +        RequestUtils.selectApplication(request, getServletContext());
  +        getApplicationConfig(request).getProcessor().process
  +            (request, response);
   
       }
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>