You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ws...@apache.org on 2006/07/13 05:37:09 UTC

svn commit: r421486 - in /struts/struts1/trunk/apps/cookbook/src/main/java/examples: ./ bean/ dyna/ links/ localization/ logic/ multibox/ options/ simple/ token/ validator/

Author: wsmoak
Date: Wed Jul 12 20:37:08 2006
New Revision: 421486

URL: http://svn.apache.org/viewvc?rev=421486&view=rev
Log:
STR-2900 Fix Checkstyle errors in struts-cookbook.
Submitted by: Frank Zammetti

Modified:
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/SuccessAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/ExampleBean.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/NestedBean.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/PrepareBeanAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/dyna/ProcessDynaAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/PrepareLinksAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/ProcessLinksAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/localization/ProcessLocalizationAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/logic/PrepareLogicAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/MultiboxActionForm.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/PrepareMultiboxAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/ProcessMultiboxAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/BookBean.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/PrepareOptionsAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/ProcessOptionsAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/ProcessSimpleAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/SimpleActionForm.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/PrepareTokenAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/ProcessTokenAction.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/CustomValidator.java
    struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/ProcessValidatorAction.java

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/SuccessAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/SuccessAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/SuccessAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/SuccessAction.java Wed Jul 12 20:37:08 2006
@@ -28,31 +28,31 @@
 
 /**
  * <p>An Action that forwards control via a "success" ActionFoward.</p>
- * 
- * <p>A recommended strategy is that view pages should link only to Actions and 
+ *
+ * <p>A recommended strategy is that view pages should link only to Actions and
  * never directly to other views. In situations where the view does not require
- * any preparation you can use a SuccessAction, specifying the view as an 
+ * any preparation you can use a SuccessAction, specifying the view as an
  * ActionForward named "success" in your action mapping.</p>
- * 
+ *
  * <p>e.g. If you configure an ActionMapping in struts-config.xml like this:</p>
- * 
+ *
  * <pre>
- *    &lt;action path="/prepareView" 
+ *    &lt;action path="/prepareView"
  *            type="examples.SuccessAction"&gt;
  *        &lt;forward name="success" path="/jsp/View.jsp"/&gt;
  *    &lt/action&gt;
  * </pre>
- * 
+ *
  * <p>You could create a link to the view (via the Action) as follows:</p>
- * 
+ *
  * <pre>
  *     &lt;html:link action="/prepareView"&gt;Display 'view' page&lt;/html:link&gt;
  * </pre>
- * 
- * <p>If you later change your application such that the view page requires some 
- * initialization you can change a single ActionMapping definition in 
+ *
+ * <p>If you later change your application such that the view page requires some
+ * initialization you can change a single ActionMapping definition in
  * struts-config.xml rather than lots of link definitions in many JSPs.</p>
- * 
+ *
  * @version $Rev$ $Date$
  */
 public class SuccessAction extends Action {
@@ -69,9 +69,9 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Returns the <code>ActionForward</code> named "success" if one is 
+     * Returns the <code>ActionForward</code> named "success" if one is
      * configured or <code>null</code>if it cannot be found.
-     * 
+     *
      * Searches first for a local forward, then a global forward.
      *
      * @param mapping The ActionMapping used to select this instance
@@ -80,7 +80,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if mapping.findForward throws an Exception
-     * 
+     *
      * @return the "success" ActionForward, or null if it cannot be found
      */
     public ActionForward execute(

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/ExampleBean.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/ExampleBean.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/ExampleBean.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/ExampleBean.java Wed Jul 12 20:37:08 2006
@@ -66,7 +66,7 @@
 
     /** HTML formatted markup */
     private String html =
-          "<p>This is a <strong>simple</strong> example of " 
+          "<p>This is a <strong>simple</strong> example of "
         + "<em>HTML</em> formatted text.</p>";
 
     // ------------------------------------------------------------ Constructors

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/NestedBean.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/NestedBean.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/NestedBean.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/NestedBean.java Wed Jul 12 20:37:08 2006
@@ -29,10 +29,10 @@
 public class NestedBean implements Serializable {
 
     // ------------------------------------------------------ Instance Variables
-    
+
     /** A string value */
     private String stringValue = "This is a string from NestedBean";
-    
+
     // ------------------------------------------------------------ Constructors
 
     /**

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/PrepareBeanAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/PrepareBeanAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/PrepareBeanAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/bean/PrepareBeanAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Perform any tasks and setup any data that 
+ * Perform any tasks and setup any data that
  * must be prepared before the form is displayed.
  *
  * @version $Rev$ $Date$
@@ -46,8 +46,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -56,7 +56,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if an exception occurs
-     * 
+     *
      * @return the ActionForward to forward control to
      */
     public ActionForward execute(
@@ -72,10 +72,10 @@
         example.getList().add("List entry #2");
         example.getList().add("List entry #3");
         example.getList().add("List entry #4");
-        
+
         // Add a nested bean
         example.setNested(new NestedBean());
-       
+
         // Place the example bean in the request scope
         request.setAttribute("example", example);
 

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/dyna/ProcessDynaAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/dyna/ProcessDynaAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/dyna/ProcessDynaAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/dyna/ProcessDynaAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -45,8 +45,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -55,7 +55,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(
@@ -65,7 +65,7 @@
         HttpServletResponse response)
         throws Exception {
 
-        // If user pressed 'Cancel' button, 
+        // If user pressed 'Cancel' button,
         // return to home page
         if (isCancelled(request)) {
             return mapping.findForward("home");

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/PrepareLinksAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/PrepareLinksAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/PrepareLinksAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/PrepareLinksAction.java Wed Jul 12 20:37:08 2006
@@ -31,7 +31,7 @@
 import examples.TestBean;
 
 /**
- * Perform any tasks and setup any data that 
+ * Perform any tasks and setup any data that
  * must be prepared before the form is displayed.
  *
  * @version $Rev$ $Date$
@@ -50,8 +50,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -60,7 +60,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if an exception occurs
-     * 
+     *
      * @return the ActionForward to forward control to
      */
     public ActionForward execute(
@@ -75,10 +75,10 @@
         parms.put("fruit", "Apple");
         parms.put("animal", "Rabbit");
         request.setAttribute("parms", parms);
-        
+
         TestBean bean = new TestBean();
-        request.setAttribute("testBean", bean);        
-        
+        request.setAttribute("testBean", bean);
+
         // Just forward to the form - no preparation required
         return mapping.findForward("success");
 

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/ProcessLinksAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/ProcessLinksAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/ProcessLinksAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/links/ProcessLinksAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -45,8 +45,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -55,7 +55,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/localization/ProcessLocalizationAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/localization/ProcessLocalizationAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/localization/ProcessLocalizationAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/localization/ProcessLocalizationAction.java Wed Jul 12 20:37:08 2006
@@ -31,7 +31,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -49,8 +49,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -59,7 +59,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(
@@ -71,12 +71,12 @@
 
         // Extract attributes we will need
         HttpSession session = request.getSession();
-        
+
         // Get locale from request, if any
         Locale locale = request.getLocale();
 
-        // If supplied, set Locale based on request parameters; 
-        // country and language 
+        // If supplied, set Locale based on request parameters;
+        // country and language
         String language = request.getParameter("language");
         String country = request.getParameter("country");
 
@@ -85,8 +85,8 @@
             locale = new java.util.Locale(language, country);
         } else if (language != null && language.length() > 0) {
             locale = new java.util.Locale(language, "");
-        } 
-        
+        }
+
         //Save locale
         session.setAttribute(Globals.LOCALE_KEY, locale);
 

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/logic/PrepareLogicAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/logic/PrepareLogicAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/logic/PrepareLogicAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/logic/PrepareLogicAction.java Wed Jul 12 20:37:08 2006
@@ -35,7 +35,7 @@
 import examples.options.BookBean;
 
 /**
- * Perform any tasks and setup any data that 
+ * Perform any tasks and setup any data that
  * must be prepared before the form is displayed.
  *
  * @version $Rev$ $Date$
@@ -54,8 +54,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -64,7 +64,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if an exception occurs
-     * 
+     *
      * @return the ActionForward to forward control to
      */
     public ActionForward execute(
@@ -95,7 +95,7 @@
         request.setAttribute("books", books);
 
         ActionErrors errors = new ActionErrors();
-        
+
         errors.add(ActionMessages.GLOBAL_MESSAGE,
             new ActionMessage("errors.detail", "This is a global error #1"));
         errors.add(ActionMessages.GLOBAL_MESSAGE,
@@ -111,10 +111,10 @@
         messages.add("test",
             new ActionMessage("message.example.simple"));
 
-        
+
         saveMessages(request, messages);
         saveErrors(request, errors);
-        
+
         // Forward to the form
         return mapping.findForward("success");
 

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/MultiboxActionForm.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/MultiboxActionForm.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/MultiboxActionForm.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/MultiboxActionForm.java Wed Jul 12 20:37:08 2006
@@ -59,14 +59,14 @@
     public void reset(ActionMapping mapping, HttpServletRequest request) {
 
         /*
-         * The ActionForm reset method should only be used to *clear* 
+         * The ActionForm reset method should only be used to *clear*
          * checkboxes. The correct place to *set* default checkbox values is in
          * the 'prepare' action, called prior to displaying the form page.
-         */ 
+         */
         String[] empty = {};
         this.fruits = empty;
         this.colors = empty;
-              
+
     }
 
     /**
@@ -78,16 +78,16 @@
      *
      * @param mapping The mapping used to select this instance
      * @param request The servlet request we are processing
-     * 
+     *
      * @return ActionMessages if any validation errors occurred
      */
     public ActionErrors validate(
         ActionMapping mapping,
         HttpServletRequest request) {
-        
+
         /*
-         * We're not doing any validation (yet) so return null to 
-         * indicate that there were no errors. (We don't 
+         * We're not doing any validation (yet) so return null to
+         * indicate that there were no errors. (We don't
          * actually need to override this nethod unles we're doing
          * validation - but it's here for reference)
          */

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/PrepareMultiboxAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/PrepareMultiboxAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/PrepareMultiboxAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/PrepareMultiboxAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Perform any tasks and setup any data that 
+ * Perform any tasks and setup any data that
  * must be prepared before the form is displayed.
  *
  * @version $Rev$ $Date$
@@ -46,8 +46,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -56,7 +56,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if an exception occurs
-     * 
+     *
      * @return the ActionForward to forward control to
      */
     public ActionForward execute(
@@ -67,24 +67,24 @@
         throws Exception {
 
         System.out.println("Prepare MultiboxActionForm ....");
-            
-        /* 
-         * Prepare a String array of color names used to generate 
+
+        /*
+         * Prepare a String array of color names used to generate
          * checkboxes using html:multibox tags in the JSP page.
          */
         String[] colors =
             { "Red", "Orange", "Yellow", "Green", "Blue", "Indigo", "Violet" };
         request.setAttribute("colors", colors);
-    
+
         /*
-         * Set default checkbox values. 
-         */ 
+         * Set default checkbox values.
+         */
         String[] defaultFruits = { "Orange", "Banana", "Apple" };
         String[] defaultColors = { "Orange", "Yellow" };
         MultiboxActionForm multiboxForm = (MultiboxActionForm) form;
         multiboxForm.setFruits(defaultFruits);
         multiboxForm.setColors(defaultColors);
-        
+
         // Return an ActionForward to the form
         return mapping.findForward("success");
 

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/ProcessMultiboxAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/ProcessMultiboxAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/ProcessMultiboxAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/multibox/ProcessMultiboxAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -45,8 +45,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -55,7 +55,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(
@@ -65,7 +65,7 @@
         HttpServletResponse response)
         throws Exception {
 
-        // If user pressed 'Cancel' button, 
+        // If user pressed 'Cancel' button,
         // return to home page
         if (isCancelled(request)) {
             return mapping.findForward("home");

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/BookBean.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/BookBean.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/BookBean.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/BookBean.java Wed Jul 12 20:37:08 2006
@@ -26,12 +26,12 @@
 public class BookBean {
 
     // ------------------------------------------------------ Instance Variables
-    
+
     /**
      * International Standard Book Number (ISBN)
      */
     private String isbn;
-    
+
     /**
      * Book Title
      */

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/PrepareOptionsAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/PrepareOptionsAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/PrepareOptionsAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/PrepareOptionsAction.java Wed Jul 12 20:37:08 2006
@@ -31,7 +31,7 @@
 import org.apache.struts.util.LabelValueBean;
 
 /**
- * Perform any tasks and setup any data that 
+ * Perform any tasks and setup any data that
  * must be prepared before the form is displayed.
  *
  * @version $Rev$ $Date$
@@ -50,8 +50,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -60,7 +60,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if an exception occurs
-     * 
+     *
      * @return the ActionForward to forward control to
      */
     public ActionForward execute(
@@ -132,18 +132,18 @@
         books.add(new BookBean("0971661901", "Struts Fast Track"));
         request.setAttribute("books", books);
 
-        /* A Map 
-         * 
-         * Note: We are using a HashMap which is unsorted - the resulting 
+        /* A Map
+         *
+         * Note: We are using a HashMap which is unsorted - the resulting
          * options could appear in any order. If you want to your options to be
          * in a particular order you should you a SortedMap implementation such
-         * as the TreeMap. This behaviour is a feature of the standard Map 
+         * as the TreeMap. This behaviour is a feature of the standard Map
          * implementaions and nothing to to with Struts tags.
-         * 
-         * Also, we've used an Integer as the key to demonstrate that the 
-         * <html:options> and <html:optionsCollection> tags do not require 
+         *
+         * Also, we've used an Integer as the key to demonstrate that the
+         * <html:options> and <html:optionsCollection> tags do not require
          * String values for the label and values. If they are passed an object
-         * other than a String, they will automatically call the toString() 
+         * other than a String, they will automatically call the toString()
          * method and use the result.
          */
         HashMap animals = new HashMap();

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/ProcessOptionsAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/ProcessOptionsAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/ProcessOptionsAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/options/ProcessOptionsAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -45,8 +45,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -55,7 +55,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(
@@ -65,7 +65,7 @@
         HttpServletResponse response)
         throws Exception {
 
-        // If user pressed 'Cancel' button, 
+        // If user pressed 'Cancel' button,
         // return to home page
         if (isCancelled(request)) {
             return mapping.findForward("home");

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/ProcessSimpleAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/ProcessSimpleAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/ProcessSimpleAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/ProcessSimpleAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -45,8 +45,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -55,7 +55,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(
@@ -65,12 +65,12 @@
         HttpServletResponse response)
         throws Exception {
 
-        // If user pressed 'Cancel' button, 
+        // If user pressed 'Cancel' button,
         // return to home page
         if (isCancelled(request)) {
             return mapping.findForward("home");
         }
-        
+
         // Forward to result page
         return mapping.findForward("success");
     }

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/SimpleActionForm.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/SimpleActionForm.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/SimpleActionForm.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/simple/SimpleActionForm.java Wed Jul 12 20:37:08 2006
@@ -93,7 +93,7 @@
      *
      * @param mapping The mapping used to select this instance
      * @param request The servlet request we are processing
-     * 
+     *
      * @return ActionMessages if any validation errors occurred
      */
     public ActionErrors validate(

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/PrepareTokenAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/PrepareTokenAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/PrepareTokenAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/PrepareTokenAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Perform any tasks and setup any data that 
+ * Perform any tasks and setup any data that
  * must be prepared before the form is displayed.
  *
  * @version $Rev$ $Date$
@@ -46,8 +46,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -56,7 +56,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if an exception occurs
-     * 
+     *
      * @return the ActionForward to forward control to
      */
     public ActionForward execute(
@@ -66,10 +66,10 @@
         HttpServletResponse response)
         throws Exception {
 
-        // Generate a unique token that will be 
+        // Generate a unique token that will be
         // check when the form is submitted
         saveToken(request);
-       
+
 
         // Forward to the form
         return mapping.findForward("success");

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/ProcessTokenAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/ProcessTokenAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/ProcessTokenAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/token/ProcessTokenAction.java Wed Jul 12 20:37:08 2006
@@ -30,7 +30,7 @@
 import org.apache.struts.action.ActionMessages;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -48,8 +48,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -58,7 +58,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(
@@ -68,7 +68,7 @@
         HttpServletResponse response)
         throws Exception {
 
-        // If user pressed 'Cancel' button, 
+        // If user pressed 'Cancel' button,
         // return to home page
         if (isCancelled(request)) {
             return mapping.findForward("home");
@@ -76,7 +76,7 @@
 
         ActionErrors errors = new ActionErrors();
 
-        // Prevent unintentional duplication submissions by checking 
+        // Prevent unintentional duplication submissions by checking
         // that we have not received this token previously
         if (!isTokenValid(request)) {
             errors.add(

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/CustomValidator.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/CustomValidator.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/CustomValidator.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/CustomValidator.java Wed Jul 12 20:37:08 2006
@@ -45,9 +45,9 @@
 
     // ---------------------------------------------------------- Public Methods
 
-    /** 
+    /**
      * Example validator for comparing the equality of two fields
-     * 
+     *
      * http://struts.apache.org/userGuide/dev_validator.html
      * http://www.raibledesigns.com/page/rd/20030226
      */
@@ -57,7 +57,7 @@
         Field field,
         ActionMessages errors,
         HttpServletRequest request) {
-    	
+
         String value =
             ValidatorUtils.getValueAsString(bean, field.getProperty());
         String property2 = field.getVarValue("secondProperty");

Modified: struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/ProcessValidatorAction.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/ProcessValidatorAction.java?rev=421486&r1=421485&r2=421486&view=diff
==============================================================================
--- struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/ProcessValidatorAction.java (original)
+++ struts/struts1/trunk/apps/cookbook/src/main/java/examples/validator/ProcessValidatorAction.java Wed Jul 12 20:37:08 2006
@@ -27,7 +27,7 @@
 import org.apache.struts.action.ActionMapping;
 
 /**
- * Retrieve and process data from the submitted form 
+ * Retrieve and process data from the submitted form
  *
  * @version $Rev$ $Date$
  */
@@ -45,8 +45,8 @@
     // ---------------------------------------------------------- Action Methods
 
     /**
-     * Process the request and return an <code>ActionForward</code> instance 
-     * describing where and how control should be forwarded, or 
+     * Process the request and 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 mapping The ActionMapping used to select this instance
@@ -55,7 +55,7 @@
      * @param response The HTTP response we are creating
      *
      * @exception Exception if the application logic throws an exception
-     * 
+     *
      * @return the ActionForward for the next view
      */
     public ActionForward execute(
@@ -65,7 +65,7 @@
         HttpServletResponse response)
         throws Exception {
 
-        // If user pressed 'Cancel' button, 
+        // If user pressed 'Cancel' button,
         // return to home page
         if (isCancelled(request)) {
             return mapping.findForward("home");