Commits

cameronbraid  committed 44ca0cb

changed doEndTag return codes to be JSP spec compliant.

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@64573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 668b628

Comments (0)

Files changed (10)

File src/java/com/opensymphony/webwork/views/jsp/ActionTag.java

 import com.opensymphony.webwork.dispatcher.ServletDispatcher;
 import com.opensymphony.webwork.dispatcher.SessionMap;
 import com.opensymphony.webwork.views.velocity.Renderer;
+
 import com.opensymphony.xwork.ActionContext;
 import com.opensymphony.xwork.ActionInvocation;
 import com.opensymphony.xwork.ActionProxy;
 import com.opensymphony.xwork.ActionProxyFactory;
+
 import ognl.Ognl;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.velocity.context.Context;
 
+import java.io.Writer;
+
+import java.util.HashMap;
+import java.util.Map;
+
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
-import java.io.Writer;
-import java.util.HashMap;
-import java.util.Map;
 
 
 /**
     //~ Methods ////////////////////////////////////////////////////////////////
 
     /**
+     * If set to true the result of an action will be executed.
+     * @param executeResult
+     */
+    public void setExecuteResult(boolean executeResult) {
+        this.executeResult = executeResult;
+    }
+
+    /**
      * Sets the name of the action to be invoked
      * @param name the name of the Action as defined in the xwork.xml file
      */
         this.namespace = namespace;
     }
 
-    /**
-     * If set to true the result of an action will be executed.
-     * @param executeResult
-     */
-    public void setExecuteResult(boolean executeResult) {
-        this.executeResult = executeResult;
-    }
-
     public Map getParams() {
         return params;
     }
 
         pageContext.setAttribute(getId(), proxy.getAction());
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     public int doStartTag() throws JspException {

File src/java/com/opensymphony/webwork/views/jsp/BeanTag.java

         OgnlValueStack stack = ActionContext.getContext().getValueStack();
         stack.pop();
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     public int doStartTag() throws JspException {

File src/java/com/opensymphony/webwork/views/jsp/ElseIfTag.java

             pageContext.setAttribute(IfTag.ANSWER, answer);
         }
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     public int doStartTag() throws JspException {

File src/java/com/opensymphony/webwork/views/jsp/IfTag.java

             pageContext.setAttribute(ANSWER, answer);
         }
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     public int doStartTag() throws JspException {

File src/java/com/opensymphony/webwork/views/jsp/ParamTag.java

             }
         }
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     /**

File src/java/com/opensymphony/webwork/views/jsp/PropertyTag.java

             log.info("Could not print out value '" + value + "': " + e.getMessage());
         }
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     /**

File src/java/com/opensymphony/webwork/views/jsp/PushTag.java

             stack.pop();
         }
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     public int doStartTag() throws JspException {

File src/java/com/opensymphony/webwork/views/jsp/SetTag.java

             ActionContext.getContext().put(name, o);
         }
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     /**

File src/java/com/opensymphony/webwork/views/jsp/URLTag.java

             }
         }
 
-        return EVAL_PAGE;
+        return SKIP_BODY;
     }
 
     public int doStartTag() throws JspException {

File src/test/com/opensymphony/webwork/views/jsp/SetTagTest.java

         tag.setName("foo");
         tag.setValue("name");
         tag.setScope("application");
-        assertEquals(Tag.EVAL_PAGE, tag.doStartTag());
+        assertEquals(Tag.SKIP_BODY, tag.doStartTag());
         application.verify();
     }
 
         tag.setName("foo");
         tag.setValue("name");
         tag.setScope("page");
-        assertEquals(Tag.EVAL_PAGE, tag.doStartTag());
+        assertEquals(Tag.SKIP_BODY, tag.doStartTag());
     }
 
     public void testRequestScope() throws JspException {
         tag.setName("foo");
         tag.setValue("name");
         tag.setScope("request");
-        assertEquals(Tag.EVAL_PAGE, tag.doStartTag());
+        assertEquals(Tag.SKIP_BODY, tag.doStartTag());
         request.verify();
     }
 
         tag.setName("foo");
         tag.setValue("name");
         tag.setScope("session");
-        assertEquals(Tag.EVAL_PAGE, tag.doStartTag());
+        assertEquals(Tag.SKIP_BODY, tag.doStartTag());
         session.verify();
     }
 
     public void testWebWorkScope() throws JspException {
         tag.setName("foo");
         tag.setValue("name");
-        assertEquals(Tag.EVAL_PAGE, tag.doStartTag());
+        assertEquals(Tag.SKIP_BODY, tag.doStartTag());
         assertEquals("chewie", ActionContext.getContext().get("foo"));
     }
 
     public void testWebWorkScope2() throws JspException {
         tag.setName("chewie");
-        assertEquals(Tag.EVAL_PAGE, tag.doStartTag());
+        assertEquals(Tag.SKIP_BODY, tag.doStartTag());
         assertEquals(chewie, ActionContext.getContext().get("chewie"));
     }