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

[struts] branch WW-5261-tag-utils created (now 41ddf7de3)

This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a change to branch WW-5261-tag-utils
in repository https://gitbox.apache.org/repos/asf/struts.git


      at 41ddf7de3 WW-5261 Avoids creating ValueStack if no ActionContext is available

This branch includes the following new commits:

     new 41ddf7de3 WW-5261 Avoids creating ValueStack if no ActionContext is available

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[struts] 01/01: WW-5261 Avoids creating ValueStack if no ActionContext is available

Posted by lu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lukaszlenart pushed a commit to branch WW-5261-tag-utils
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 41ddf7de34f52ee44bfdc30dbb871026120e1175
Author: Lukasz Lenart <lu...@apache.org>
AuthorDate: Mon May 29 15:36:53 2023 +0200

    WW-5261 Avoids creating ValueStack if no ActionContext is available
---
 .../apache/struts2/components/ActionComponent.java |  41 +-
 .../org/apache/struts2/components/Component.java   |  21 +-
 .../java/org/apache/struts2/components/Form.java   |  92 ++-
 .../struts2/views/jsp/StrutsBodyTagSupport.java    |  42 +-
 .../org/apache/struts2/views/jsp/TagUtils.java     |  73 +--
 .../apache/struts2/views/jsp/AbstractTagTest.java  |  33 +-
 .../apache/struts2/views/jsp/ActionTagTest.java    |  56 +-
 .../apache/struts2/views/jsp/AnchorTagTest.java    | 231 +++----
 .../org/apache/struts2/views/jsp/URLTagTest.java   | 715 ++++++++++-----------
 .../apache/struts2/views/jsp/ui/FormTagTest.java   | 220 ++++---
 .../apache/struts2/views/jsp/ui/TextfieldTest.java |  71 +-
 11 files changed, 792 insertions(+), 803 deletions(-)

diff --git a/core/src/main/java/org/apache/struts2/components/ActionComponent.java b/core/src/main/java/org/apache/struts2/components/ActionComponent.java
index 7cc3f4343..521db09c0 100644
--- a/core/src/main/java/org/apache/struts2/components/ActionComponent.java
+++ b/core/src/main/java/org/apache/struts2/components/ActionComponent.java
@@ -31,20 +31,18 @@ import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.StrutsException;
 import org.apache.struts2.StrutsStatics;
 import org.apache.struts2.dispatcher.Dispatcher;
-import org.apache.struts2.dispatcher.RequestMap;
 import org.apache.struts2.dispatcher.HttpParameters;
+import org.apache.struts2.dispatcher.RequestMap;
 import org.apache.struts2.dispatcher.mapper.ActionMapper;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.views.annotations.StrutsTag;
 import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import org.apache.struts2.views.jsp.TagUtils;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.PageContext;
 import java.io.IOException;
 import java.io.Writer;
-import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -53,7 +51,7 @@ import java.util.Map;
  * namespace.  The body content of the tag is used to render the results from the Action.  Any result processor defined
  * for this action in struts.xml will be ignored, <i>unless</i> the executeResult parameter is specified.</p>
  * <!-- END SNIPPET: javadoc -->
- *
+ * <p>
  * <!-- START SNIPPET: params -->
  * <ul>
  *      <li>id (String) - the id (if specified) to put the action under stack's context.
@@ -111,9 +109,8 @@ import java.util.Map;
  *  &lt;s:property value=&quot;#attr.stringByAction&quot; /&gt;
  * <!-- END SNIPPET: example -->
  * </pre>
- *
  */
-@StrutsTag(name="action", tldTagClass="org.apache.struts2.views.jsp.ActionTag", description="Execute an action from within a view")
+@StrutsTag(name = "action", tldTagClass = "org.apache.struts2.views.jsp.ActionTag", description = "Execute an action from within a view")
 public class ActionComponent extends ContextBean {
     private static final Logger LOG = LogManager.getLogger(ActionComponent.class);
 
@@ -143,7 +140,7 @@ public class ActionComponent extends ContextBean {
     public void setActionProxyFactory(ActionProxyFactory actionProxyFactory) {
         this.actionProxyFactory = actionProxyFactory;
     }
-    
+
     @Inject
     public void setValueStackFactory(ValueStackFactory valueStackFactory) {
         this.valueStackFactory = valueStackFactory;
@@ -163,7 +160,7 @@ public class ActionComponent extends ContextBean {
                 try {
                     writer.flush();
                 } catch (IOException e) {
-                	LOG.warn("error while trying to flush writer ", e);
+                    LOG.warn("error while trying to flush writer ", e);
                 }
             }
             executeAction();
@@ -188,11 +185,11 @@ public class ActionComponent extends ContextBean {
         Dispatcher du = Dispatcher.getInstance();
         Map<String, Object> extraContext = du.createContextMap(
             new RequestMap(req),
-                newParams,
-                session,
-                application,
-                req,
-                res);
+            newParams,
+            session,
+            application,
+            req,
+            res);
 
         ValueStack newStack = valueStackFactory.createValueStack(stack);
 
@@ -206,7 +203,7 @@ public class ActionComponent extends ContextBean {
     /**
      * Creates parameters map using parameters from the value stack and component parameters.  Any non-String array
      * values will be converted into a single-value String array.
-     * 
+     *
      * @return A map of String[] parameters
      */
     protected HttpParameters createParametersForContext() {
@@ -233,8 +230,6 @@ public class ActionComponent extends ContextBean {
      * attempt to derive a namespace using buildNamespace().  The ActionProxy
      * and the namespace will be saved into the instance variables proxy and
      * namespace respectively.
-     *
-     * @see org.apache.struts2.views.jsp.TagUtils#buildNamespace
      */
     protected void executeAction() {
         String actualName = findString(name, "name", "Action name is required. Example: updatePerson");
@@ -254,7 +249,7 @@ public class ActionComponent extends ContextBean {
         String namespace;
 
         if (this.namespace == null) {
-            namespace = TagUtils.buildNamespace(actionMapper, getStack(), req);
+            namespace = getNamespace(getStack());
         } else {
             namespace = findString(this.namespace);
         }
@@ -291,32 +286,32 @@ public class ActionComponent extends ContextBean {
         }
     }
 
-    @StrutsTagAttribute(required=true,description="Name of the action to be executed (without the extension suffix eg. .action)")
+    @StrutsTagAttribute(required = true, description = "Name of the action to be executed (without the extension suffix eg. .action)")
     public void setName(String name) {
         this.name = name;
     }
 
-    @StrutsTagAttribute(description="Namespace for action to call", defaultValue="namespace from where tag is used")
+    @StrutsTagAttribute(description = "Namespace for action to call", defaultValue = "namespace from where tag is used")
     public void setNamespace(String namespace) {
         this.namespace = namespace;
     }
 
-    @StrutsTagAttribute(description="Whether the result of this action (probably a view) should be executed/rendered", type="Boolean", defaultValue="false")
+    @StrutsTagAttribute(description = "Whether the result of this action (probably a view) should be executed/rendered", type = "Boolean", defaultValue = "false")
     public void setExecuteResult(boolean executeResult) {
         this.executeResult = executeResult;
     }
 
-    @StrutsTagAttribute(description="Whether the request parameters are to be included when the action is invoked", type="Boolean", defaultValue="false")
+    @StrutsTagAttribute(description = "Whether the request parameters are to be included when the action is invoked", type = "Boolean", defaultValue = "false")
     public void setIgnoreContextParams(boolean ignoreContextParams) {
         this.ignoreContextParams = ignoreContextParams;
     }
 
-    @StrutsTagAttribute(description="Whether the writer should be flush upon end of action component tag, default to true", type="Boolean", defaultValue="true")
+    @StrutsTagAttribute(description = "Whether the writer should be flush upon end of action component tag, default to true", type = "Boolean", defaultValue = "true")
     public void setFlush(boolean flush) {
         this.flush = flush;
     }
 
-    @StrutsTagAttribute(description="Whether an exception should be rethrown, if the target action throws an exception", type="Boolean", defaultValue="false")
+    @StrutsTagAttribute(description = "Whether an exception should be rethrown, if the target action throws an exception", type = "Boolean", defaultValue = "false")
     public void setRethrowException(boolean rethrowException) {
         this.rethrowException = rethrowException;
     }
diff --git a/core/src/main/java/org/apache/struts2/components/Component.java b/core/src/main/java/org/apache/struts2/components/Component.java
index 579087098..ba0d672bf 100644
--- a/core/src/main/java/org/apache/struts2/components/Component.java
+++ b/core/src/main/java/org/apache/struts2/components/Component.java
@@ -18,6 +18,8 @@
  */
 package org.apache.struts2.components;
 
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.security.NotExcludedAcceptedPatternsChecker;
 import com.opensymphony.xwork2.util.TextParseUtil;
@@ -34,7 +36,6 @@ import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.util.ComponentUtils;
 import org.apache.struts2.util.FastByteArrayOutputStream;
 import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import org.apache.struts2.views.jsp.TagUtils;
 import org.apache.struts2.views.util.UrlHelper;
 
 import javax.servlet.http.HttpServletRequest;
@@ -372,8 +373,8 @@ public class Component {
      * evaluating to String.class, else the whole <code>expression</code> is evaluated
      * against the stack.
      *
-     * @param expression   OGNL expression.
-     * @param toType the type expected to find.
+     * @param expression OGNL expression.
+     * @param toType     the type expected to find.
      * @return the Object found, or <tt>null</tt> if not found.
      */
     protected Object findValue(String expression, Class<?> toType) {
@@ -429,7 +430,7 @@ public class Component {
         String result;
 
         if (namespace == null) {
-            result = TagUtils.buildNamespace(actionMapper, stack, req);
+            result = getNamespace(stack);
         } else {
             result = findString(namespace);
         }
@@ -441,6 +442,12 @@ public class Component {
         return result;
     }
 
+    protected String getNamespace(ValueStack stack) {
+        ActionContext context = ActionContext.of(stack.getContext());
+        ActionInvocation invocation = context.getActionInvocation();
+        return invocation.getProxy().getNamespace();
+    }
+
     /**
      * Pushes this component's parameter Map as well as the component itself on to the stack
      * and then copies the supplied parameters over. Because the component's parameter Map is
@@ -581,12 +588,12 @@ public class Component {
      * <em>Note:</em> All Tag classes that extend {@link org.apache.struts2.views.jsp.StrutsBodyTagSupport} must implement a setter for
      * this attribute (same name), and it must be defined at the Tag class level.
      * Defining a setter in the superclass alone is insufficient (results in "Cannot find a setter method for the attribute").
-     *
+     * <p>
      * See {@link org.apache.struts2.views.jsp.StrutsBodyTagSupport#clearTagStateForTagPoolingServers()  for additional details.
      *
      * @param performClearTagStateForTagPoolingServers true if tag state should be cleared, false otherwise.
      */
-    @StrutsTagAttribute(description="Whether to clear all tag state during doEndTag() processing (if applicable)", type="Boolean", defaultValue="false")
+    @StrutsTagAttribute(description = "Whether to clear all tag state during doEndTag() processing (if applicable)", type = "Boolean", defaultValue = "false")
     public void setPerformClearTagStateForTagPoolingServers(boolean performClearTagStateForTagPoolingServers) {
         this.performClearTagStateForTagPoolingServers = performClearTagStateForTagPoolingServers;
     }
@@ -609,7 +616,7 @@ public class Component {
         }
 
         LOG.warn("Expression [{}] isn't allowed by pattern [{}]! See Accepted / Excluded patterns at\n" +
-                "https://struts.apache.org/security/", expression, isAllowed.getAllowedPattern());
+            "https://struts.apache.org/security/", expression, isAllowed.getAllowedPattern());
 
         return false;
     }
diff --git a/core/src/main/java/org/apache/struts2/components/Form.java b/core/src/main/java/org/apache/struts2/components/Form.java
index 44bdd0999..92758fbee 100644
--- a/core/src/main/java/org/apache/struts2/components/Form.java
+++ b/core/src/main/java/org/apache/struts2/components/Form.java
@@ -26,13 +26,17 @@ import com.opensymphony.xwork2.config.entities.InterceptorMapping;
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.interceptor.MethodFilterInterceptorUtil;
 import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.validator.*;
+import com.opensymphony.xwork2.validator.ActionValidatorManager;
+import com.opensymphony.xwork2.validator.FieldValidator;
+import com.opensymphony.xwork2.validator.ValidationException;
+import com.opensymphony.xwork2.validator.ValidationInterceptor;
+import com.opensymphony.xwork2.validator.Validator;
+import com.opensymphony.xwork2.validator.ValidatorContext;
 import com.opensymphony.xwork2.validator.validators.VisitorFieldValidator;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.views.annotations.StrutsTag;
 import org.apache.struts2.views.annotations.StrutsTagAttribute;
-import org.apache.struts2.views.jsp.TagUtils;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -72,7 +76,7 @@ import java.util.Set;
  * from it and using UrlHelper to generate the final url.
  * </li>
  * </ol>
- *
+ * <p>
  * <!-- END SNIPPET: javadoc -->
  *
  * <p><b>Examples</b></p>
@@ -84,13 +88,12 @@ import java.util.Set;
  *
  * <!-- END SNIPPET: example -->
  * </pre>
- *
  */
 @StrutsTag(
-    name="form",
-    tldTagClass="org.apache.struts2.views.jsp.ui.FormTag",
-    description="Renders an input form",
-    allowDynamicAttributes=true)
+    name = "form",
+    tldTagClass = "org.apache.struts2.views.jsp.ui.FormTag",
+    description = "Renders an input form",
+    allowDynamicAttributes = true)
 public class Form extends ClosingUIBean {
     public static final String OPEN_TEMPLATE = "form";
     public static final String TEMPLATE = "form-close";
@@ -147,7 +150,7 @@ public class Form extends ClosingUIBean {
 
     @Inject
     public void setUrlRenderer(UrlRenderer urlRenderer) {
-    	this.urlRenderer = urlRenderer;
+        this.urlRenderer = urlRenderer;
     }
 
     @Inject
@@ -157,9 +160,9 @@ public class Form extends ClosingUIBean {
 
 
     /*
-    * Revised for Portlet actionURL as form action, and add wwAction as hidden
-    * field. Refer to template.simple/form.vm
-    */
+     * Revised for Portlet actionURL as form action, and add wwAction as hidden
+     * field. Refer to template.simple/form.vm
+     */
     @Override
     protected void evaluateExtraParams() {
         super.evaluateExtraParams();
@@ -170,9 +173,9 @@ public class Form extends ClosingUIBean {
         if (name == null) {
             //make the name the same as the id
             String id = (String) getParameters().get("id");
-             if (StringUtils.isNotEmpty(id)) {
+            if (StringUtils.isNotEmpty(id)) {
                 addParameter("name", id);
-             }
+            }
         }
 
         if (onsubmit != null) {
@@ -231,8 +234,9 @@ public class Form extends ClosingUIBean {
 
     /**
      * Evaluate client side JavaScript Enablement.
-     * @param actionName the actioName to check for
-     * @param namespace the namespace to check for
+     *
+     * @param actionName   the actioName to check for
+     * @param namespace    the namespace to check for
      * @param actionMethod the method to ckeck for
      */
     protected void evaluateClientSideJsEnablement(String actionName, String namespace, String actionMethod) {
@@ -275,7 +279,7 @@ public class Form extends ClosingUIBean {
         ActionMapping mapping = actionMapper.getMappingFromActionName(formActionValue);
 
         if (mapping == null) {
-            mapping =  actionMapper.getMappingFromActionName((String) getParameters().get("actionName"));
+            mapping = actionMapper.getMappingFromActionName((String) getParameters().get("actionName"));
         }
 
         if (mapping == null) {
@@ -288,7 +292,7 @@ public class Form extends ClosingUIBean {
         if (isValidateAnnotatedMethodOnly(actionName)) {
             methodName = mapping.getMethod();
         }
-        
+
         List<Validator> actionValidators = actionValidatorManager.getValidators(actionClass, actionName, methodName);
         List<Validator> validators = new ArrayList<>();
 
@@ -299,7 +303,7 @@ public class Form extends ClosingUIBean {
 
     private boolean isValidateAnnotatedMethodOnly(String actionName) {
         RuntimeConfiguration runtimeConfiguration = configuration.getRuntimeConfiguration();
-        String actionNamespace = TagUtils.buildNamespace(actionMapper, stack, request);
+        String actionNamespace = getNamespace(stack);
         ActionConfig actionConfig = runtimeConfiguration.getActionConfig(actionNamespace, actionName);
 
         if (actionConfig != null) {
@@ -355,64 +359,84 @@ public class Form extends ClosingUIBean {
     public static class FieldVisitorValidatorWrapper implements FieldValidator {
         private FieldValidator fieldValidator;
         private String namePrefix;
+
         public FieldVisitorValidatorWrapper(FieldValidator fv, String namePrefix) {
             this.fieldValidator = fv;
             this.namePrefix = namePrefix;
         }
+
         public String getValidatorType() {
             return "field-visitor";
         }
+
         public String getFieldName() {
             return namePrefix + fieldValidator.getFieldName();
         }
+
         public FieldValidator getFieldValidator() {
             return fieldValidator;
         }
+
         public void setFieldValidator(FieldValidator fieldValidator) {
             this.fieldValidator = fieldValidator;
         }
+
         public String getDefaultMessage() {
             return fieldValidator.getDefaultMessage();
         }
+
         public String getMessage(Object object) {
             return fieldValidator.getMessage(object);
         }
+
         public String getMessageKey() {
             return fieldValidator.getMessageKey();
         }
+
         public String[] getMessageParameters() {
             return fieldValidator.getMessageParameters();
         }
+
         public ValidatorContext getValidatorContext() {
             return fieldValidator.getValidatorContext();
         }
+
         public void setDefaultMessage(String message) {
             fieldValidator.setDefaultMessage(message);
         }
+
         public void setFieldName(String fieldName) {
             fieldValidator.setFieldName(fieldName);
         }
+
         public void setMessageKey(String key) {
             fieldValidator.setMessageKey(key);
         }
+
         public void setMessageParameters(String[] messageParameters) {
             fieldValidator.setMessageParameters(messageParameters);
         }
+
         public void setValidatorContext(ValidatorContext validatorContext) {
             fieldValidator.setValidatorContext(validatorContext);
         }
+
         public void setValidatorType(String type) {
             fieldValidator.setValidatorType(type);
         }
+
         public void setValueStack(ValueStack stack) {
             fieldValidator.setValueStack(stack);
         }
+
         public void validate(Object object) throws ValidationException {
             fieldValidator.validate(object);
         }
+
         public String getNamePrefix() {
             return namePrefix;
         }
+
         public void setNamePrefix(String namePrefix) {
             this.namePrefix = namePrefix;
         }
@@ -421,7 +445,7 @@ public class Form extends ClosingUIBean {
     /**
      * Return type of visited object.
      *
-     * @param actionClass action class
+     * @param actionClass      action class
      * @param visitorFieldName field name
      * @return type of visited object
      */
@@ -451,68 +475,68 @@ public class Form extends ClosingUIBean {
         return sequence++;
     }
 
-    @StrutsTagAttribute(description="HTML onsubmit attribute")
+    @StrutsTagAttribute(description = "HTML onsubmit attribute")
     public void setOnsubmit(String onsubmit) {
         this.onsubmit = onsubmit;
     }
 
-    @StrutsTagAttribute(description="HTML onreset attribute")
+    @StrutsTagAttribute(description = "HTML onreset attribute")
     public void setOnreset(String onreset) {
         this.onreset = onreset;
     }
 
-    @StrutsTagAttribute(description="Set action name to submit to, without .action suffix", defaultValue="current action")
+    @StrutsTagAttribute(description = "Set action name to submit to, without .action suffix", defaultValue = "current action")
     public void setAction(String action) {
         this.action = action;
     }
 
-    @StrutsTagAttribute(description="HTML form target attribute")
+    @StrutsTagAttribute(description = "HTML form target attribute")
     public void setTarget(String target) {
         this.target = target;
     }
 
-    @StrutsTagAttribute(description="HTML form enctype attribute")
+    @StrutsTagAttribute(description = "HTML form enctype attribute")
     public void setEnctype(String enctype) {
         this.enctype = enctype;
     }
 
-    @StrutsTagAttribute(description="HTML form method attribute")
+    @StrutsTagAttribute(description = "HTML form method attribute")
     public void setMethod(String method) {
         this.method = method;
     }
 
-    @StrutsTagAttribute(description="Namespace for action to submit to", defaultValue="current namespace")
+    @StrutsTagAttribute(description = "Namespace for action to submit to", defaultValue = "current namespace")
     public void setNamespace(String namespace) {
         this.namespace = namespace;
     }
 
-    @StrutsTagAttribute(description="Whether client side/remote validation should be performed. Only" +
-                " useful with theme xhtml/ajax", type="Boolean", defaultValue="false")
+    @StrutsTagAttribute(description = "Whether client side/remote validation should be performed. Only" +
+        " useful with theme xhtml/ajax", type = "Boolean", defaultValue = "false")
     public void setValidate(String validate) {
         this.validate = validate;
     }
 
-    @StrutsTagAttribute(description="The portlet mode to display after the form submit")
+    @StrutsTagAttribute(description = "The portlet mode to display after the form submit")
     public void setPortletMode(String portletMode) {
         this.portletMode = portletMode;
     }
 
-    @StrutsTagAttribute(description="The window state to display after the form submit")
+    @StrutsTagAttribute(description = "The window state to display after the form submit")
     public void setWindowState(String windowState) {
         this.windowState = windowState;
     }
 
-    @StrutsTagAttribute(description="The accepted charsets for this form. The values may be comma or blank delimited.")
+    @StrutsTagAttribute(description = "The accepted charsets for this form. The values may be comma or blank delimited.")
     public void setAcceptcharset(String acceptcharset) {
         this.acceptcharset = acceptcharset;
     }
 
-    @StrutsTagAttribute(description="Id of element that will receive the focus when page loads.")
+    @StrutsTagAttribute(description = "Id of element that will receive the focus when page loads.")
     public void setFocusElement(String focusElement) {
         this.focusElement = focusElement;
     }
 
-    @StrutsTagAttribute(description="Whether actual context should be included in URL", type="Boolean", defaultValue="true")
+    @StrutsTagAttribute(description = "Whether actual context should be included in URL", type = "Boolean", defaultValue = "true")
     public void setIncludeContext(boolean includeContext) {
         this.includeContext = includeContext;
     }
diff --git a/core/src/main/java/org/apache/struts2/views/jsp/StrutsBodyTagSupport.java b/core/src/main/java/org/apache/struts2/views/jsp/StrutsBodyTagSupport.java
index 2bccb3a25..0fd430c58 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/StrutsBodyTagSupport.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/StrutsBodyTagSupport.java
@@ -20,15 +20,15 @@ package org.apache.struts2.views.jsp;
 
 import com.opensymphony.xwork2.util.TextParseUtil;
 import com.opensymphony.xwork2.util.ValueStack;
-import java.io.PrintWriter;
-import javax.servlet.jsp.JspException;
-import javax.servlet.jsp.tagext.BodyTagSupport;
 import org.apache.struts2.util.ComponentUtils;
 import org.apache.struts2.util.FastByteArrayOutputStream;
 
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.tagext.BodyTagSupport;
+import java.io.PrintWriter;
 
 /**
- * Contains common functonalities for Struts JSP Tags.
+ * Contains common functionalities for Struts JSP Tags.
  */
 public class StrutsBodyTagSupport extends BodyTagSupport {
 
@@ -84,7 +84,7 @@ public class StrutsBodyTagSupport extends BodyTagSupport {
 
     /**
      * Release state for a Struts JSP Tag handler.
-     * 
+     * <p>
      * According to the JSP API documentation, the page compiler guarantees that the release() method
      * will be invoked on the Tag handler before releasing it to the GC (garbage collector).  It does
      * not specify <em>when</em> the release() call will be made, though, and timing likely depends
@@ -94,7 +94,7 @@ public class StrutsBodyTagSupport extends BodyTagSupport {
     public void release() {
         // Ensure release() performs the clearTagStateForTagPoolingServers tag state clearing processing with
         // the clear state flag forced to true (if not already set to true), to ensure cleanup.
-        // The performClearTagStateForTagPoolingServers flag state is preserved for consistency, in case 
+        // The performClearTagStateForTagPoolingServers flag state is preserved for consistency, in case
         // release() is called by framework code.
         final boolean originalPerformClearTagState = getPerformClearTagStateForTagPoolingServers();
         if (originalPerformClearTagState == true) {
@@ -110,18 +110,18 @@ public class StrutsBodyTagSupport extends BodyTagSupport {
     /**
      * Request that the tag state be cleared during {@link StrutsBodyTagSupport#doEndTag()} processing,
      * which may help with certain edge cases with tag logic running on servers that implement JSP Tag Pooling.
-     * 
+     *
      * <em>Note:</em> Even though the Tag classes extend this class {@link StrutsBodyTagSupport}, and this method
      * {@link StrutsBodyTagSupport#setPerformClearTagStateForTagPoolingServers(boolean)} exists in the method hierarchy,
      * the JSP processing requires us to explicitly override it in <em>every Tag class<em> in order for the Tag handler
-     * method to be visible to the JSP processing. 
+     * method to be visible to the JSP processing.
      * Defining a setter in the superclass alone is insufficient (results in "Cannot find a setter method for the attribute").
-     * 
+     * <p>
      * See {@link StrutsBodyTagSupport#clearTagStateForTagPoolingServers()} for additional details.
-     * 
+     *
      * <em>Warning:</em> Setting this value to true may allow for the desired behaviour, but doing so
      * may violate the JSP specification.  <em>Set to true at your own risk</em>.
-     * 
+     *
      * @param performClearTagStateForTagPoolingServers true if tag state should be cleared, false otherwise.
      */
     public void setPerformClearTagStateForTagPoolingServers(boolean performClearTagStateForTagPoolingServers) {
@@ -130,7 +130,7 @@ public class StrutsBodyTagSupport extends BodyTagSupport {
 
     /**
      * Allow descendant tags to check if the tag state should be cleared during {@link StrutsBodyTagSupport#doEndTag()} processing,
-     * 
+     *
      * @return true if tag state should be cleared, false (default) otherwise.
      */
     protected boolean getPerformClearTagStateForTagPoolingServers() {
@@ -140,16 +140,16 @@ public class StrutsBodyTagSupport extends BodyTagSupport {
     /**
      * Provide a mechanism to clear tag state, to handle servlet container JSP tag pooling
      * behaviour with some servers, such as Glassfish.
-     * 
-     * Usage: Override this method in descendant classes to clear any state that might cause issues should the 
-     *        servlet container re-use a cached instance of the tag object.  If the descendant class does not
-     *        declare any new field members then it should not be strictly necessary to call this method there.
-     *        Typically that means calling the ancestor's {@link ComponentTagSupport#clearTagStateForTagPoolingServers()}
-     *        method first, then resetting instance variables at the current level to their default state.
-     * 
+     * <p>
+     * Usage: Override this method in descendant classes to clear any state that might cause issues should the
+     * servlet container re-use a cached instance of the tag object.  If the descendant class does not
+     * declare any new field members then it should not be strictly necessary to call this method there.
+     * Typically that means calling the ancestor's {@link ComponentTagSupport#clearTagStateForTagPoolingServers()}
+     * method first, then resetting instance variables at the current level to their default state.
+     * <p>
      * Note: If the descendant overrides {@link StrutsBodyTagSupport#doEndTag()}, and does not call
-     *       super.doEndTag(), then the descendant should call this method in the descendant doEndTag() method
-     *       to ensure consistent clearing of tag state.
+     * super.doEndTag(), then the descendant should call this method in the descendant doEndTag() method
+     * to ensure consistent clearing of tag state.
      */
     protected void clearTagStateForTagPoolingServers() {
         // Default implementation.
diff --git a/core/src/main/java/org/apache/struts2/views/jsp/TagUtils.java b/core/src/main/java/org/apache/struts2/views/jsp/TagUtils.java
index 966ce1c55..089768deb 100644
--- a/core/src/main/java/org/apache/struts2/views/jsp/TagUtils.java
+++ b/core/src/main/java/org/apache/struts2/views/jsp/TagUtils.java
@@ -19,27 +19,15 @@
 package org.apache.struts2.views.jsp;
 
 import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionInvocation;
 import com.opensymphony.xwork2.config.ConfigurationException;
 import com.opensymphony.xwork2.util.ValueStack;
-import com.opensymphony.xwork2.util.ValueStackFactory;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
-import org.apache.struts2.RequestUtils;
 import org.apache.struts2.ServletActionContext;
-import org.apache.struts2.dispatcher.ApplicationMap;
-import org.apache.struts2.dispatcher.Dispatcher;
-import org.apache.struts2.dispatcher.HttpParameters;
-import org.apache.struts2.dispatcher.RequestMap;
-import org.apache.struts2.dispatcher.SessionMap;
-import org.apache.struts2.dispatcher.mapper.ActionMapper;
-import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.util.AttributeMap;
 
 import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.PageContext;
-import java.util.Map;
 
 public class TagUtils {
 
@@ -48,68 +36,21 @@ public class TagUtils {
     public static ValueStack getStack(PageContext pageContext) {
         HttpServletRequest req = (HttpServletRequest) pageContext.getRequest();
         ValueStack stack = ServletActionContext.getValueStack(req);
+        stack = stack != null ? stack : ActionContext.getContext().getValueStack();
 
         if (stack == null) {
-
-            HttpServletResponse res = (HttpServletResponse) pageContext.getResponse();
-            Dispatcher du = Dispatcher.getInstance();
-            if (du == null) {
-                throw new ConfigurationException("The Struts dispatcher cannot be found.  This is usually caused by "+
-                        "using Struts tags without the associated filter. Struts tags are only usable when the request "+
-                        "has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag.");
-            }
-            stack = du.getContainer().getInstance(ValueStackFactory.class).createValueStack();
-
-            HttpParameters params = HttpParameters.create(req.getParameterMap()).build();
-
-            Map<String, Object> extraContext = du.createContextMap(new RequestMap(req),
-                    params,
-                    new SessionMap(req),
-                    new ApplicationMap(pageContext.getServletContext()),
-                    req,
-                    res);
-            extraContext.put(ServletActionContext.PAGE_CONTEXT, pageContext);
-            stack.getContext().putAll(extraContext);
-            req.setAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY, stack);
-
-            // also tie this stack/context to the ThreadLocal
-            ActionContext.of(stack.getContext()).bind();
+            throw new ConfigurationException("Rendering tag out of Action scope, accessing directly JSPs is not recommended! " +
+                "Please read https://struts.apache.org/security/#never-expose-jsp-files-directly");
         } else {
             // let's make sure that the current page context is in the action context
-            // TODO: refactor this to stop using put()
-            Map<String, Object> context = stack.getContext();
-            context.put(ServletActionContext.PAGE_CONTEXT, pageContext);
+            AttributeMap attrMap = new AttributeMap(stack.getContext());
 
-            AttributeMap attrMap = new AttributeMap(context);
-            context.put("attr", attrMap);
+            stack.getActionContext()
+                .withPageContext(pageContext)
+                .with("attr", attrMap);
         }
 
         return stack;
     }
 
-    public static String buildNamespace(ActionMapper mapper, ValueStack stack, HttpServletRequest request) {
-        ActionContext context = ActionContext.of(stack.getContext());
-        ActionInvocation invocation = context.getActionInvocation();
-
-        if (invocation == null) {
-            TagUtils.LOG.warn("ActionInvocation is null, tag has been executed out of the Action and this can lead " +
-                "to a security vulnerability, please read http://struts.apache.org/security/#never-expose-jsp-files-directly !");
-
-            ActionMapping mapping = mapper.getMapping(request,
-                    Dispatcher.getInstance().getConfigurationManager());
-
-            if (mapping != null) {
-                return mapping.getNamespace();
-            } else {
-                // well, if the ActionMapper can't tell us, and there is no existing action invocation,
-                // let's just go with a default guess that the namespace is the last the path minus the
-                // last part (/foo/bar/baz.xyz -> /foo/bar)
-
-                String path = RequestUtils.getServletPath(request);
-                return path.substring(0, path.lastIndexOf('/'));
-            }
-        } else {
-            return invocation.getProxy().getNamespace();
-        }
-    }
 }
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java
index 243af7797..c1b8188fa 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/AbstractTagTest.java
@@ -21,7 +21,11 @@ package org.apache.struts2.views.jsp;
 import com.mockobjects.dynamic.Mock;
 import com.opensymphony.xwork2.Action;
 import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionInvocation;
+import com.opensymphony.xwork2.ActionProxy;
 import com.opensymphony.xwork2.inject.Container;
+import com.opensymphony.xwork2.mock.MockActionInvocation;
+import com.opensymphony.xwork2.mock.MockActionProxy;
 import com.opensymphony.xwork2.util.ValueStack;
 import org.apache.commons.lang3.builder.EqualsBuilder;
 import org.apache.struts2.ServletActionContext;
@@ -46,6 +50,7 @@ import java.util.Map;
  */
 public abstract class AbstractTagTest extends StrutsInternalTestCase {
     protected Action action;
+    protected ActionProxy actionProxy;
     protected Map<String, Object> context;
     protected Map<String, Object> session;
     protected ValueStack stack;
@@ -57,6 +62,7 @@ public abstract class AbstractTagTest extends StrutsInternalTestCase {
     protected StrutsMockHttpServletRequest request;
     protected StrutsMockPageContext pageContext;
     protected HttpServletResponse response;
+    protected ActionInvocation actionInvocation;
 
     protected Mock mockContainer;
 
@@ -78,6 +84,7 @@ public abstract class AbstractTagTest extends StrutsInternalTestCase {
 
     protected void createMocks() {
         action = this.getAction();
+        actionProxy = new MockActionProxy();
         container.inject(action);
 
         stack = ActionContext.getContext().getValueStack();
@@ -119,11 +126,35 @@ public abstract class AbstractTagTest extends StrutsInternalTestCase {
         extraContext = ActionContext.of(extraContext).withLocale(null).getContextMap();
         stack.getContext().putAll(extraContext);
 
-        ActionContext.of(context)
+        actionInvocation = new MockActionInvocation();
+        ((MockActionInvocation) actionInvocation).setAction(action);
+
+        ((MockActionProxy) actionProxy).setAction(action);
+        ((MockActionProxy) actionProxy).setInvocation(actionInvocation);
+        ((MockActionInvocation) actionInvocation).setProxy(actionProxy);
+
+        request.setRequestURI("/");
+        withRequestPath(request.getRequestURI());
+
+        ActionContext ac = ActionContext.of(context)
             .withServletRequest(request)
             .withServletResponse(response)
             .withServletContext(servletContext)
+            .withActionInvocation(actionInvocation)
             .bind();
+
+        ((MockActionInvocation) actionInvocation).setInvocationContext(ac);
+    }
+
+    protected void withRequestPath(String path) {
+        request.setRequestURI(path);
+        String namespace = path.substring(0, path.lastIndexOf('/'));
+        String actionName = path.substring(path.lastIndexOf('/') + 1);
+        if (namespace.equals("") && !actionName.contains(".action")) {
+            actionName = path;
+        }
+        ((MockActionProxy) actionProxy).setNamespace(namespace);
+        ((MockActionProxy) actionProxy).setActionName(actionName);
     }
 
     @Override
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
index 4d3eb3b3e..9678b600e 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ActionTagTest.java
@@ -45,7 +45,7 @@ import java.util.Map;
 public class ActionTagTest extends AbstractTagTest {
 
     public void testActionTagWithNamespace() {
-        request.setupGetServletPath(TestConfigurationProvider.TEST_NAMESPACE + "/" + "foo.action");
+        withRequestPath(TestConfigurationProvider.TEST_NAMESPACE + "/" + "foo.action");
 
         ActionTag tag = new ActionTag();
         tag.setPageContext(pageContext);
@@ -72,11 +72,11 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionTagWithNamespace_clearTagStateSet() {
-        request.setupGetServletPath(TestConfigurationProvider.TEST_NAMESPACE + "/" + "foo.action");
+        withRequestPath(TestConfigurationProvider.TEST_NAMESPACE + "/" + "foo.action");
 
         ActionTag tag = new ActionTag();
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -106,7 +106,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testSimple() {
@@ -145,7 +145,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -188,7 +188,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -234,7 +234,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -277,7 +277,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -306,7 +306,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -329,7 +329,7 @@ public class ActionTagTest extends AbstractTagTest {
         TestActionTagResult result = (TestActionTagResult) component.getProxy().getInvocation().getResult();
 
         assertTrue(stack.getContext().containsKey(ServletActionContext.PAGE_CONTEXT));
-        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT)instanceof PageContext);
+        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT) instanceof PageContext);
         assertTrue(result.isExecuted());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
@@ -338,7 +338,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -367,7 +367,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionWithoutExecuteResult_clearTagStateSet() throws Exception {
@@ -389,7 +389,7 @@ public class ActionTagTest extends AbstractTagTest {
         TestActionTagResult result = (TestActionTagResult) component.getProxy().getInvocation().getResult();
 
         assertTrue(stack.getContext().containsKey(ServletActionContext.PAGE_CONTEXT));
-        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT)instanceof PageContext);
+        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT) instanceof PageContext);
         assertNull(result); // result is never executed, hence never set into invocation
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
@@ -398,7 +398,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testExecuteButResetReturnSameInvocation() throws Exception {
@@ -426,11 +426,11 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
-     public void testExecuteButResetReturnSameInvocation_clearTagStateSet() throws Exception {
+    public void testExecuteButResetReturnSameInvocation_clearTagStateSet() throws Exception {
         Mock mockActionInv = new Mock(ActionInvocation.class);
         ActionTag tag = new ActionTag();
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -458,7 +458,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIngoreContextParamsFalse() throws Exception {
@@ -490,7 +490,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -526,7 +526,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
     }
 
@@ -559,7 +559,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIngoreContextParamsTrue_clearTagStateSet() throws Exception {
@@ -572,7 +572,7 @@ public class ActionTagTest extends AbstractTagTest {
         tag.setIgnoreContextParams(true);
 
         Map<String, String[]> params = new HashMap<>();
-        params.put("user", new String[] { "Santa Claus" });
+        params.put("user", new String[]{"Santa Claus"});
         ActionContext.getContext().withParameters(HttpParameters.create(params).build());
 
         tag.doStartTag();
@@ -594,7 +594,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoNameDefined() throws Exception {
@@ -632,7 +632,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     // FIXME: Logging the error seems to cause the standard Maven build to fail
@@ -655,7 +655,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionMethodWithExecuteResult() throws Exception {
@@ -684,7 +684,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionMethodWithExecuteResult_clearTagStateSet() throws Exception {
@@ -694,7 +694,7 @@ public class ActionTagTest extends AbstractTagTest {
         tag.setNamespace("");
         tag.setName("testActionTagAction!input");
         tag.setExecuteResult(true);
-        ((DefaultActionMapper)container.getInstance(ActionMapper.class)).setAllowDynamicMethodCalls("true");
+        ((DefaultActionMapper) container.getInstance(ActionMapper.class)).setAllowDynamicMethodCalls("true");
 
         tag.doStartTag();
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
@@ -707,7 +707,7 @@ public class ActionTagTest extends AbstractTagTest {
         TestActionTagResult result = (TestActionTagResult) component.getProxy().getInvocation().getResult();
 
         assertTrue(stack.getContext().containsKey(ServletActionContext.PAGE_CONTEXT));
-        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT)instanceof PageContext);
+        assertTrue(stack.getContext().get(ServletActionContext.PAGE_CONTEXT) instanceof PageContext);
         assertTrue(result.isExecuted());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
@@ -716,7 +716,7 @@ public class ActionTagTest extends AbstractTagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     @Override
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/AnchorTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/AnchorTagTest.java
index 7d0de563c..ccc728945 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/AnchorTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/AnchorTagTest.java
@@ -18,18 +18,17 @@
  */
 package org.apache.struts2.views.jsp;
 
-import java.io.StringWriter;
-import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.text.MessageFormat;
+import org.apache.struts2.views.jsp.ui.AnchorTag;
+import org.apache.struts2.views.jsp.ui.StrutsBodyContent;
 
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.JspWriter;
-
-import org.apache.struts2.views.jsp.ui.AnchorTag;
-import org.apache.struts2.views.jsp.ui.StrutsBodyContent;
+import java.io.StringWriter;
+import java.text.MessageFormat;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -55,7 +54,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionURL_clearTagStateSet() {
@@ -77,7 +76,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAddParameters() {
@@ -100,7 +99,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAddParameters_clearTagStateSet() {
@@ -126,7 +125,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -206,14 +205,14 @@ public class AnchorTagTest extends AbstractUITagTest {
         tag.doEndTag();
 
         assertEquals(wrapWithAnchor("testAction.action?id1=paramId1&amp;id2=tagId2&" +
-                "amp;tagId=tagValue&amp;urlParam1=urlValue1&amp;urlParam2=urlValue2&amp;param1=param1value&amp;param2=param2value"), writer.toString());
+            "amp;tagId=tagValue&amp;urlParam1=urlValue1&amp;urlParam2=urlValue2&amp;param1=param1value&amp;param2=param2value"), writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -298,7 +297,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         tag.doEndTag();
 
         assertEquals(wrapWithAnchor("testAction.action?id1=paramId1&amp;id2=tagId2&" +
-                "amp;tagId=tagValue&amp;urlParam1=urlValue1&amp;urlParam2=urlValue2&amp;param1=param1value&amp;param2=param2value"), writer.toString());
+            "amp;tagId=tagValue&amp;urlParam1=urlValue1&amp;urlParam2=urlValue2&amp;param1=param1value&amp;param2=param2value"), writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -306,7 +305,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -336,7 +335,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
 
         //String[]
         stack.getContext().put("param2value", new String[]{"d", "e"});
@@ -350,11 +349,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
 
         //ValueHolder[]
         stack.getContext().put("param3value", new URLTagTest.ValueHolder[]{
-                new URLTagTest.ValueHolder("f"), new URLTagTest.ValueHolder("g")});
+            new URLTagTest.ValueHolder("f"), new URLTagTest.ValueHolder("g")});
         ParamTag param3 = new ParamTag();
         param3.setPageContext(pageContext);
         param3.setName("p3");
@@ -365,11 +364,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         tag.doEndTag();
-        
-        String result =  writer.toString();
+
+        String result = writer.toString();
         assertTrue(result.contains("p1=a"));
         assertTrue(result.contains("p1=b"));
         assertTrue(result.contains("p2=d"));
@@ -383,7 +382,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -418,7 +417,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
 
         //String[]
         stack.getContext().put("param2value", new String[]{"d", "e"});
@@ -434,11 +433,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
 
         //ValueHolder[]
         stack.getContext().put("param3value", new URLTagTest.ValueHolder[]{
-                new URLTagTest.ValueHolder("f"), new URLTagTest.ValueHolder("g")});
+            new URLTagTest.ValueHolder("f"), new URLTagTest.ValueHolder("g")});
         ParamTag param3 = new ParamTag();
         param3.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
         param3.setPageContext(pageContext);
@@ -451,11 +450,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         assertTrue("Tag state after doEndTag() inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         tag.doEndTag();
 
-        String result =  writer.toString();
+        String result = writer.toString();
         assertTrue(result.contains("p1=a"));
         assertTrue(result.contains("p1=b"));
         assertTrue(result.contains("p2=d"));
@@ -470,7 +469,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -478,7 +477,7 @@ public class AnchorTagTest extends AbstractUITagTest {
      * To test priority of parameter passed in to url component though
      * various way, with includeParams="NONE"
      * </p>
-     *
+     * <p>
      * - current request url<br>
      * - tag's value attribute<br>
      * - tag's nested param tag<br>
@@ -488,6 +487,7 @@ public class AnchorTagTest extends AbstractUITagTest {
      * Those from request will not count, only those in tag's value attribute
      * and nested param tag.
      * </p>
+     *
      * @throws Exception
      */
     public void testParametersPriorityWithIncludeParamsAsNONE() throws Exception {
@@ -528,28 +528,28 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
-   /**
+    /**
      * <p>
      * To test priority of parameter passed in to url component though
      * various way, with includeParams="NONE"
      * </p>
-     *
+     * <p>
      * - current request url<br>
      * - tag's value attribute<br>
      * - tag's nested param tag<br>
@@ -559,6 +559,7 @@ public class AnchorTagTest extends AbstractUITagTest {
      * Those from request will not count, only those in tag's value attribute
      * and nested param tag.
      * </p>
+     *
      * @throws Exception
      */
     public void testParametersPriorityWithIncludeParamsAsNONE_clearTagStateSet() throws Exception {
@@ -608,13 +609,13 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -622,7 +623,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeParamsDefaultToGET() throws Exception {
@@ -648,7 +649,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeParamsDefaultToGET_clearTagStateSet() throws Exception {
@@ -677,7 +678,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionURL2() throws Exception {
@@ -689,7 +690,7 @@ public class AnchorTagTest extends AbstractUITagTest {
     }
 
     public void testAddParameters2() throws Exception {
-        request.setAttribute("struts.request_uri", "/TestAction.action");
+        withRequestPath("/TestAction.action");
         request.setQueryString("param0=value0");
 
         tag.doStartTag();
@@ -719,21 +720,21 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "For this test, tag only has pageContext set, so it should still be equal.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAddParameters2_clearTagStateSet() throws Exception {
-        request.setAttribute("struts.request_uri", "/TestAction.action");
+        withRequestPath("/TestAction.action");
         request.setQueryString("param0=value0");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -770,10 +771,10 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -781,7 +782,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testEvaluateValue() throws Exception {
@@ -799,7 +800,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testEvaluateValue_clearTagStateSet() throws Exception {
@@ -820,7 +821,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testHttps() throws Exception {
@@ -839,7 +840,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testHttps_clearTagStateSet() throws Exception {
@@ -861,7 +862,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAnchor() throws Exception {
@@ -881,7 +882,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAnchor_clearTagStateSet() throws Exception {
@@ -904,11 +905,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testParamPrecedence() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         AnchorTag anchor = new AnchorTag();
@@ -933,18 +934,18 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(anchor, freshTag));
+            strutsBodyTagsAreReflectionEqual(anchor, freshTag));
     }
 
     public void testParamPrecedence_clearTagStateSet() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         AnchorTag anchor = new AnchorTag();
@@ -974,7 +975,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -982,11 +983,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(anchor, freshTag));
+            strutsBodyTagsAreReflectionEqual(anchor, freshTag));
     }
 
     public void testParamPrecedenceWithAnchor() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         AnchorTag anchorTag = new AnchorTag();
@@ -1012,18 +1013,18 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(anchorTag, freshTag));
+            strutsBodyTagsAreReflectionEqual(anchorTag, freshTag));
     }
 
     public void testParamPrecedenceWithAnchor_clearTagStateSet() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         AnchorTag anchorTag = new AnchorTag();
@@ -1054,7 +1055,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -1062,7 +1063,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(anchorTag, freshTag));
+            strutsBodyTagsAreReflectionEqual(anchorTag, freshTag));
     }
 
     public void testUsingValueOnly() throws Exception {
@@ -1076,7 +1077,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testUsingValueOnly_clearTagStateSet() throws Exception {
@@ -1093,7 +1094,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeNone() throws Exception {
@@ -1112,7 +1113,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeNone_clearTagStateSet() throws Exception {
@@ -1134,7 +1135,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGet() throws Exception {
@@ -1153,7 +1154,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGet_clearTagStateSet() throws Exception {
@@ -1175,7 +1176,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGetDoNotEscapeAmp() throws Exception {
@@ -1195,7 +1196,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGetDoNotEscapeAmp_clearTagStateSet() throws Exception {
@@ -1218,11 +1219,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeNone() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setAction(null);
@@ -1230,18 +1231,18 @@ public class AnchorTagTest extends AbstractUITagTest {
         tag.doStartTag();
         tag.doEndTag();
 
-        assertEquals(wrapWithAnchor("/public/about"), writer.toString());
+        assertEquals(wrapWithAnchor("/public/about.action"), writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeNone_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1251,7 +1252,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
         tag.doEndTag();
 
-        assertEquals(wrapWithAnchor("/public/about"), writer.toString());
+        assertEquals(wrapWithAnchor("/public/about.action"), writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -1259,11 +1260,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoActionIncludeGet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setAction(null);
@@ -1271,18 +1272,18 @@ public class AnchorTagTest extends AbstractUITagTest {
         tag.doStartTag();
         tag.doEndTag();
 
-        assertEquals(wrapWithAnchor("/public/about?section=team&amp;company=acme+inc"), writer.toString());
+        assertEquals(wrapWithAnchor("/public/about.action?section=team&amp;company=acme+inc"), writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoActionIncludeGet_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1292,7 +1293,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
         tag.doEndTag();
 
-        assertEquals(wrapWithAnchor("/public/about?section=team&amp;company=acme+inc"), writer.toString());
+        assertEquals(wrapWithAnchor("/public/about.action?section=team&amp;company=acme+inc"), writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -1300,7 +1301,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeAll() throws Exception {
@@ -1333,14 +1334,14 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeAll_clearTagStateSet() throws Exception {
@@ -1374,11 +1375,11 @@ public class AnchorTagTest extends AbstractUITagTest {
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ParamTag freshParamTag = new ParamTag();
-        freshParamTag.setPerformClearTagStateForTagPoolingServers(true); 
+        freshParamTag.setPerformClearTagStateForTagPoolingServers(true);
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -1386,11 +1387,11 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeAll() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setAction(null);
@@ -1409,7 +1410,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         tag.doEndTag();
 
         String result = writer.toString();
-        assertTrue(result.contains("/public/about?"));
+        assertTrue(result.contains("/public/about.action?"));
         assertTrue(result.contains("section=team"));
         assertTrue(result.contains("company=acme+inc"));
         assertTrue(result.contains("year=2006"));
@@ -1419,18 +1420,18 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeAll_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1453,7 +1454,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         tag.doEndTag();
 
         String result = writer.toString();
-        assertTrue(result.contains("/public/about?"));
+        assertTrue(result.contains("/public/about.action?"));
         assertTrue(result.contains("section=team"));
         assertTrue(result.contains("company=acme+inc"));
         assertTrue(result.contains("year=2006"));
@@ -1464,7 +1465,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -1472,28 +1473,28 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testUnknownIncludeParam() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team");
 
         tag.setIncludeParams("unknown"); // will log at WARN level
         tag.doStartTag();
         tag.doEndTag();
-        assertEquals(wrapWithAnchor("/public/about"), writer.toString()); // should not add any request parameters
+        assertEquals(wrapWithAnchor("/public/about.action"), writer.toString()); // should not add any request parameters
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testUnknownIncludeParam_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1501,7 +1502,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         tag.doStartTag();
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
         tag.doEndTag();
-        assertEquals(wrapWithAnchor("/public/about"), writer.toString()); // should not add any request parameters
+        assertEquals(wrapWithAnchor("/public/about.action"), writer.toString()); // should not add any request parameters
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         AnchorTag freshTag = new AnchorTag();
@@ -1509,7 +1510,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIWithAnchor() throws Exception {
@@ -1528,10 +1529,10 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
-        public void testRequestURIWithAnchor_clearTagStateSet() throws Exception {
+    public void testRequestURIWithAnchor_clearTagStateSet() throws Exception {
         request.setRequestURI("/public/about");
         request.setQueryString("company=acme inc#canada");
 
@@ -1550,7 +1551,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeContext() throws Exception {
@@ -1568,7 +1569,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeContext_clearTagStateSet() throws Exception {
@@ -1589,7 +1590,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testForceAddSchemeHostAndPort() throws Exception {
@@ -1605,7 +1606,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testForceAddSchemeHostAndPort_clearTagStateSet() throws Exception {
@@ -1624,7 +1625,7 @@ public class AnchorTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     private String wrapWithAnchor(String href) {
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/URLTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/URLTagTest.java
index 2a06a65b1..fc9fbe757 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/URLTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/URLTagTest.java
@@ -18,18 +18,13 @@
  */
 package org.apache.struts2.views.jsp;
 
-import java.io.File;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-import javax.servlet.http.HttpSession;
-import javax.servlet.jsp.JspWriter;
-
+import com.mockobjects.dynamic.Mock;
+import com.mockobjects.servlet.MockBodyContent;
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.ActionProxy;
+import com.opensymphony.xwork2.DefaultActionInvocation;
+import com.opensymphony.xwork2.DefaultActionProxyFactory;
+import com.opensymphony.xwork2.inject.Container;
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.components.URL;
 import org.apache.struts2.dispatcher.ApplicationMap;
@@ -40,17 +35,18 @@ import org.apache.struts2.dispatcher.SessionMap;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.dispatcher.mapper.DefaultActionMapper;
 
-import com.mockobjects.dynamic.Mock;
-import com.mockobjects.servlet.MockBodyContent;
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.ActionProxy;
-import com.opensymphony.xwork2.DefaultActionInvocation;
-import com.opensymphony.xwork2.DefaultActionProxyFactory;
-import com.opensymphony.xwork2.inject.Container;
+import javax.servlet.http.HttpSession;
+import javax.servlet.jsp.JspWriter;
+import java.io.File;
+import java.io.StringWriter;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * Unit test for {@link URLTag}.
- *
  */
 public class URLTagTest extends AbstractUITagTest {
 
@@ -60,43 +56,43 @@ public class URLTagTest extends AbstractUITagTest {
     /**
      * To test priority of parameter passed in to url component though
      * various way
-     *  - current request url
-     *  - tag's value attribute
-     *  - tag's nested param tag
-     *
+     * - current request url
+     * - tag's value attribute
+     * - tag's nested param tag
+     * <p>
      * id1
      * ===
      * - found in current request url
      * - found in tag's value attribute
      * - found in tag's param tag
      * CONCLUSION: tag's param tag takes precedence (paramId1)
-     *
+     * <p>
      * id2
      * ===
      * - found in current request url
      * - found in tag's value attribute
      * CONCLUSION: tag's value attribute take precedence (tagId2)
-     *
+     * <p>
      * urlParam1
      * =========
      * - found in current request url
      * CONCLUSION: param in current request url will be used (urlValue1)
-     *
+     * <p>
      * urlParam2
      * =========
      * - found in current request url
      * CONCLUSION: param in current request url will be used. (urlValue2)
-     *
+     * <p>
      * tagId
      * =====
      * - found in tag's value attribute
      * CONCLUSION: param in tag's value attribute wil; be used. (tagValue)
-     *
+     * <p>
      * param1
      * ======
      * - found in nested param tag
      * CONCLUSION: param in nested param tag will be used. (param1value)
-     *
+     * <p>
      * param2
      * ======
      * - found in nested param tag
@@ -152,62 +148,62 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
      * To test priority of parameter passed in to url component though
      * various way
-     *  - current request url
-     *  - tag's value attribute
-     *  - tag's nested param tag
-     *
+     * - current request url
+     * - tag's value attribute
+     * - tag's nested param tag
+     * <p>
      * id1
      * ===
      * - found in current request url
      * - found in tag's value attribute
      * - found in tag's param tag
      * CONCLUSION: tag's param tag takes precedence (paramId1)
-     *
+     * <p>
      * id2
      * ===
      * - found in current request url
      * - found in tag's value attribute
      * CONCLUSION: tag's value attribute take precedence (tagId2)
-     *
+     * <p>
      * urlParam1
      * =========
      * - found in current request url
      * CONCLUSION: param in current request url will be used (urlValue1)
-     *
+     * <p>
      * urlParam2
      * =========
      * - found in current request url
      * CONCLUSION: param in current request url will be used. (urlValue2)
-     *
+     * <p>
      * tagId
      * =====
      * - found in tag's value attribute
      * CONCLUSION: param in tag's value attribute wil; be used. (tagValue)
-     *
+     * <p>
      * param1
      * ======
      * - found in nested param tag
      * CONCLUSION: param in nested param tag will be used. (param1value)
-     *
+     * <p>
      * param2
      * ======
      * - found in nested param tag
@@ -272,13 +268,13 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -286,7 +282,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -303,10 +299,10 @@ public class URLTagTest extends AbstractUITagTest {
         tag.component.addParameter("p1", list);
 
         //String[]
-        tag.component.addParameter("p2", new String[] { "d", "e" });
+        tag.component.addParameter("p2", new String[]{"d", "e"});
         //ValueHolder[]
-        tag.component.addParameter("p3", new ValueHolder[] {
-                new ValueHolder("f"), new ValueHolder("g") });
+        tag.component.addParameter("p3", new ValueHolder[]{
+            new ValueHolder("f"), new ValueHolder("g")});
 
         tag.doEndTag();
 
@@ -317,11 +313,12 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
      * Use Iterable values as the value of the param tags
+     *
      * @throws Exception
      */
     public void testIterableParameters_clearTagStateSet() throws Exception {
@@ -337,10 +334,10 @@ public class URLTagTest extends AbstractUITagTest {
         tag.component.addParameter("p1", list);
 
         //String[]
-        tag.component.addParameter("p2", new String[] { "d", "e" });
+        tag.component.addParameter("p2", new String[]{"d", "e"});
         //ValueHolder[]
-        tag.component.addParameter("p3", new ValueHolder[] {
-                new ValueHolder("f"), new ValueHolder("g") });
+        tag.component.addParameter("p3", new ValueHolder[]{
+            new ValueHolder("f"), new ValueHolder("g")});
 
         tag.doEndTag();
 
@@ -352,19 +349,19 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
      * To test priority of parameter passed in to url component though
      * various way, with includeParams="NONE"
-     *  - current request url
-     *  - tag's value attribute
-     *  - tag's nested param tag
-     *
-     *  In this case only parameters from the tag itself is taken into account.
-     *  Those from request will not count, only those in tag's value attribute
-     *  and nested param tag.
+     * - current request url
+     * - tag's value attribute
+     * - tag's nested param tag
+     * <p>
+     * In this case only parameters from the tag itself is taken into account.
+     * Those from request will not count, only those in tag's value attribute
+     * and nested param tag.
      */
     public void testParametersPriorityWithIncludeParamsAsNONE() throws Exception {
         request.setQueryString("id1=urlId1&id2=urlId2&urlParam1=urlValue1&urlParam2=urlValue2");
@@ -412,32 +409,32 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
      * To test priority of parameter passed in to url component though
      * various way, with includeParams="NONE"
-     *  - current request url
-     *  - tag's value attribute
-     *  - tag's nested param tag
-     *
-     *  In this case only parameters from the tag itself is taken into account.
-     *  Those from request will not count, only those in tag's value attribute
-     *  and nested param tag.
+     * - current request url
+     * - tag's value attribute
+     * - tag's nested param tag
+     * <p>
+     * In this case only parameters from the tag itself is taken into account.
+     * Those from request will not count, only those in tag's value attribute
+     * and nested param tag.
      *
      * @throws Exception
      */
@@ -496,13 +493,13 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -510,7 +507,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeParamsDefaultToGET() throws Exception {
@@ -542,7 +539,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeParamsDefaultToGET_clearTagStateSet() throws Exception {
@@ -577,7 +574,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionURL() throws Exception {
@@ -592,7 +589,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testActionURL_clearTagStateSet() throws Exception {
@@ -610,13 +607,11 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAddParameters() throws Exception {
-        request.setAttribute("struts.request_uri", "/Test.action");
-
-        request.setAttribute("struts.request_uri", "/TestAction.action");
+        withRequestPath("/TestAction.action");
         request.setQueryString("param0=value0");
 
         tag.doStartTag();
@@ -631,13 +626,11 @@ public class URLTagTest extends AbstractUITagTest {
         // URLTag clears component in doEndTag and has no additional state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAddParameters_clearTagStateSet() throws Exception {
-        request.setAttribute("struts.request_uri", "/Test.action");
-
-        request.setAttribute("struts.request_uri", "/TestAction.action");
+        withRequestPath("/TestAction.action");
         request.setQueryString("param0=value0");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -654,7 +647,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testEvaluateValue() throws Exception {
@@ -672,7 +665,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testEvaluateValue_clearTagStateSet() throws Exception {
@@ -693,7 +686,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testHttps() throws Exception {
@@ -712,7 +705,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testHttps_clearTagStateSet() throws Exception {
@@ -734,7 +727,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAnchor() throws Exception {
@@ -754,7 +747,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testAnchor_clearTagStateSet() throws Exception {
@@ -777,11 +770,11 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testParamPrecedence() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         URLTag urlTag = new URLTag();
@@ -806,18 +799,18 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
+            strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
     }
 
     public void testParamPrecedence_clearTagStateSet() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         URLTag urlTag = new URLTag();
@@ -847,7 +840,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -855,11 +848,11 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
+            strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
     }
 
     public void testParamPrecedenceWithAnchor() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         URLTag urlTag = new URLTag();
@@ -885,18 +878,18 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
+            strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
     }
 
     public void testParamPrecedenceWithAnchor_clearTagStateSet() throws Exception {
-        request.setRequestURI("/context/someAction.action");
+        withRequestPath("/context/someAction.action");
         request.setQueryString("id=22&name=John");
 
         URLTag urlTag = new URLTag();
@@ -927,7 +920,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -935,7 +928,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
+            strutsBodyTagsAreReflectionEqual(urlTag, freshTag));
     }
 
     public void testPutId() throws Exception {
@@ -952,7 +945,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testPutId_clearTagStateSet() throws Exception {
@@ -972,7 +965,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testUsingValueOnly() throws Exception {
@@ -986,7 +979,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testUsingValueOnly_clearTagStateSet() throws Exception {
@@ -1003,7 +996,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeNone() throws Exception {
@@ -1022,7 +1015,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeNone_clearTagStateSet() throws Exception {
@@ -1044,7 +1037,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGet() throws Exception {
@@ -1063,7 +1056,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGet_clearTagStateSet() throws Exception {
@@ -1085,7 +1078,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGetDoNotEscapeAmp() throws Exception {
@@ -1105,7 +1098,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeGetDoNotEscapeAmp_clearTagStateSet() throws Exception {
@@ -1128,11 +1121,11 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeNone() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setAction(null);
@@ -1140,18 +1133,18 @@ public class URLTagTest extends AbstractUITagTest {
         tag.doStartTag();
         tag.doEndTag();
 
-        assertEquals("/public/about", writer.toString());
+        assertEquals("/public/about.action", writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeNone_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1161,7 +1154,7 @@ public class URLTagTest extends AbstractUITagTest {
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
         tag.doEndTag();
 
-        assertEquals("/public/about", writer.toString());
+        assertEquals("/public/about.action", writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -1169,11 +1162,11 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoActionIncludeGet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setAction(null);
@@ -1181,18 +1174,18 @@ public class URLTagTest extends AbstractUITagTest {
         tag.doStartTag();
         tag.doEndTag();
 
-        assertEquals("/public/about?section=team&amp;company=acme+inc", writer.toString());
+        assertEquals("/public/about.action?section=team&amp;company=acme+inc", writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoActionIncludeGet_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1202,7 +1195,7 @@ public class URLTagTest extends AbstractUITagTest {
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
         tag.doEndTag();
 
-        assertEquals("/public/about?section=team&amp;company=acme+inc", writer.toString());
+        assertEquals("/public/about.action?section=team&amp;company=acme+inc", writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -1210,7 +1203,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeAll() throws Exception {
@@ -1239,14 +1232,14 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIActionIncludeAll_clearTagStateSet() throws Exception {
@@ -1280,7 +1273,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -1288,11 +1281,11 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeAll() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setAction(null);
@@ -1310,25 +1303,25 @@ public class URLTagTest extends AbstractUITagTest {
 
         tag.doEndTag();
 
-        assertEquals("/public/about?section=team&amp;company=acme+inc&amp;year=2006", writer.toString());
+        assertEquals("/public/about.action?section=team&amp;company=acme+inc&amp;year=2006", writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ParamTag freshParamTag = new ParamTag();
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURINoActionIncludeAll_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team&company=acme inc");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1350,7 +1343,7 @@ public class URLTagTest extends AbstractUITagTest {
 
         tag.doEndTag();
 
-        assertEquals("/public/about?section=team&amp;company=acme+inc&amp;year=2006", writer.toString());
+        assertEquals("/public/about.action?section=team&amp;company=acme+inc&amp;year=2006", writer.toString());
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ParamTag freshParamTag = new ParamTag();
@@ -1358,7 +1351,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -1366,28 +1359,28 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testUnknownIncludeParam() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team");
 
         tag.setIncludeParams("unknown"); // will log at WARN level
         tag.doStartTag();
         tag.doEndTag();
-        assertEquals("/public/about", writer.toString()); // should not add any request parameters
+        assertEquals("/public/about.action", writer.toString()); // should not add any request parameters
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testUnknownIncludeParam_clearTagStateSet() throws Exception {
-        request.setRequestURI("/public/about");
+        withRequestPath("/public/about.action");
         request.setQueryString("section=team");
 
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1395,7 +1388,7 @@ public class URLTagTest extends AbstractUITagTest {
         tag.doStartTag();
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
         tag.doEndTag();
-        assertEquals("/public/about", writer.toString()); // should not add any request parameters
+        assertEquals("/public/about.action", writer.toString()); // should not add any request parameters
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -1403,7 +1396,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIWithAnchor() throws Exception {
@@ -1422,7 +1415,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequestURIWithAnchor_clearTagStateSet() throws Exception {
@@ -1444,7 +1437,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeContext() throws Exception {
@@ -1462,7 +1455,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeContext_clearTagStateSet() throws Exception {
@@ -1483,7 +1476,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testForceAddSchemeHostAndPort() throws Exception {
@@ -1499,7 +1492,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testForceAddSchemeHostAndPort_clearTagStateSet() throws Exception {
@@ -1518,11 +1511,11 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testEmptyActionCustomMapper() throws Exception {
-        Map<String,String> props = new HashMap<>();
+        Map<String, String> props = new HashMap<>();
         props.put("config", "struts-default.xml,struts-plugin.xml,struts.xml,org/apache/struts2/views/jsp/WW3090-struts.xml");
 
         this.tearDown();
@@ -1558,11 +1551,11 @@ public class URLTagTest extends AbstractUITagTest {
 
         session = new SessionMap(request);
         Map<String, Object> extraContext = du.createContextMap(new RequestMap(request),
-                HttpParameters.create(request.getParameterMap()).build(),
-                session,
-                new ApplicationMap(pageContext.getServletContext()),
-                request,
-                response);
+            HttpParameters.create(request.getParameterMap()).build(),
+            session,
+            new ApplicationMap(pageContext.getServletContext()),
+            request,
+            response);
         // let's not set the locale -- there is a test that checks if Dispatcher actually picks this up...
         // ... but generally we want to just use no locale (let it stay system default)
         ActionContext.of(extraContext).withLocale(null);
@@ -1609,7 +1602,7 @@ public class URLTagTest extends AbstractUITagTest {
         // URLTag clears component in doEndTag and has no additional state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
         writer = new StringWriter();
         jspWriter = new StrutsMockJspWriter(writer);
@@ -1624,7 +1617,7 @@ public class URLTagTest extends AbstractUITagTest {
         // URLTag clears component in doEndTag and has no additional state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
         writer = new StringWriter();
         jspWriter = new StrutsMockJspWriter(writer);
@@ -1639,11 +1632,11 @@ public class URLTagTest extends AbstractUITagTest {
         // URLTag clears component in doEndTag and has no additional state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testEmptyActionCustomMapper_clearTagStateSet() throws Exception {
-        Map<String,String> props = new HashMap<String, String>();
+        Map<String, String> props = new HashMap<String, String>();
         props.put("config", "struts-default.xml,struts-plugin.xml,struts.xml,org/apache/struts2/views/jsp/WW3090-struts.xml");
 
         this.tearDown();
@@ -1676,11 +1669,11 @@ public class URLTagTest extends AbstractUITagTest {
 
         session = new SessionMap(request);
         Map<String, Object> extraContext = du.createContextMap(new RequestMap(request),
-                HttpParameters.create(request.getParameterMap()).build(),
-                session,
-                new ApplicationMap(pageContext.getServletContext()),
-                request,
-                response);
+            HttpParameters.create(request.getParameterMap()).build(),
+            session,
+            new ApplicationMap(pageContext.getServletContext()),
+            request,
+            response);
         // let's not set the locale -- there is a test that checks if Dispatcher actually picks this up...
         // ... but generally we want to just use no locale (let it stay system default)
         extraContext = ActionContext.of(extraContext).withLocale(null).getContextMap();
@@ -1725,7 +1718,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
         writer = new StringWriter();
         jspWriter = new StrutsMockJspWriter(writer);
@@ -1740,7 +1733,7 @@ public class URLTagTest extends AbstractUITagTest {
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
 
         writer = new StringWriter();
         jspWriter = new StrutsMockJspWriter(writer);
@@ -1755,181 +1748,181 @@ public class URLTagTest extends AbstractUITagTest {
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
-	public void testEmbeddedParamTagExpressionGetsEvaluatedCorrectly() throws Exception {
-		request.setRequestURI("/public/about");
-		request.setQueryString("section=team&company=acme inc");
-
-		tag.setAction("team");
-		tag.setIncludeParams("all");
-
-		tag.doStartTag();
-
-		Foo foo = new Foo("test");
-		stack.push(foo);
-
-		// include nested param tag
-		ParamTag paramTag = new ParamTag();
-		paramTag.setPageContext(pageContext);
-		paramTag.setName("title");
-		paramTag.setValue("%{title}");
-		paramTag.doStartTag();
-		paramTag.doEndTag();
-
-		tag.doEndTag();
-
-		assertEquals("/team.action?section=team&amp;company=acme+inc&amp;title=test", writer.toString());
-
-                // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
-                ParamTag freshParamTag = new ParamTag();
-                freshParamTag.setPageContext(pageContext);
-                assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
-                        "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                        strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
-
-                // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
-                URLTag freshTag = new URLTag();
-                freshTag.setPageContext(pageContext);
-                assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
-                        "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                        strutsBodyTagsAreReflectionEqual(tag, freshTag));
-	}
-
-	public void testEmbeddedParamTagExpressionGetsEvaluatedCorrectly_clearTagStateSet() throws Exception {
-		request.setRequestURI("/public/about");
-		request.setQueryString("section=team&company=acme inc");
-
-                tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
-		tag.setAction("team");
-		tag.setIncludeParams("all");
-
-		tag.doStartTag();
-                setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
-
-		Foo foo = new Foo("test");
-		stack.push(foo);
-
-		// include nested param tag
-		ParamTag paramTag = new ParamTag();
-                paramTag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
-		paramTag.setPageContext(pageContext);
-		paramTag.setName("title");
-		paramTag.setValue("%{title}");
-		paramTag.doStartTag();
-                setComponentTagClearTagState(paramTag, true);  // Ensure component tag state clearing is set true (to match tag).
-		paramTag.doEndTag();
-
-		tag.doEndTag();
-
-		assertEquals("/team.action?section=team&amp;company=acme+inc&amp;title=test", writer.toString());
-
-                // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
-                ParamTag freshParamTag = new ParamTag();
-                freshParamTag.setPerformClearTagStateForTagPoolingServers(true);
-                freshParamTag.setPageContext(pageContext);
-                assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
-                        "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                        strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
-
-                // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
-                URLTag freshTag = new URLTag();
-                freshTag.setPerformClearTagStateForTagPoolingServers(true);
-                freshTag.setPageContext(pageContext);
-                assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
-                        "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                        strutsBodyTagsAreReflectionEqual(tag, freshTag));
-	}
-
-	public void testAccessToStackInternalsGetsHandledCorrectly() throws Exception {
-		Map<String, Object> params = new LinkedHashMap<>();
-		params.put("aaa", new String[] {"1${#session[\"foo\"]='true'}"});
-		params.put("aab", new String[]{"1${#session[\"bar\"]}"});
-		params.put("aac", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]='true'}"});
-		params.put("aad", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]}"});
-
-		request.setParameterMap(params);
-		request.setRequestURI("/public/about");
-		request.setQueryString("aae${%23session[\"bar\"]}=1%24%7B%23session%5B%22bar%22%5D%7D");
-		session.put("bar", "rab");
-
-		tag.setAction("team");
-		tag.setIncludeParams("all");
-
-		tag.doStartTag();
-		tag.doEndTag();
-
-		Object allowMethodAccess = stack.findValue("\u0023_memberAccess['allowStaticMethodAccess']");
-		assertNull(allowMethodAccess);
-
-		assertNull(session.get("foo"));
-
-		assertEquals("/team.action?aaa=1%24%7B%23session%5B%22foo%22%5D%3D%27true%27%7D" +
-                        "&amp;" +
-                        "aab=1%24%7B%23session%5B%22bar%22%5D%7D" +
-                        "&amp;" +
-                        "aac=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3D%27true%27%7D" +
-                        "&amp;" +
-                        "aad=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%7D" +
-                        "&amp;" +
-                        "aae%24%7B%23session%5B%22bar%22%5D%7D=1%24%7B%23session%5B%22bar%22%5D%7D"
-				, writer.toString()
-		);
-
-                // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
-                URLTag freshTag = new URLTag();
-                freshTag.setPageContext(pageContext);
-                assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
-                        "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                        strutsBodyTagsAreReflectionEqual(tag, freshTag));
-	}
-
-	public void testAccessToStackInternalsGetsHandledCorrectly_clearTagStateSet() throws Exception {
-		Map<String, Object> params = new LinkedHashMap<>();
-		params.put("aaa", new String[] {"1${#session[\"foo\"]='true'}"});
-		params.put("aab", new String[]{"1${#session[\"bar\"]}"});
-		params.put("aac", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]='true'}"});
-		params.put("aad", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]}"});
-
-		request.setParameterMap(params);
-		request.setRequestURI("/public/about");
-		request.setQueryString("aae${%23session[\"bar\"]}=1%24%7B%23session%5B%22bar%22%5D%7D");
-		session.put("bar", "rab");
-
-                tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
-		tag.setAction("team");
-		tag.setIncludeParams("all");
-
-		tag.doStartTag();
-                setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
-		tag.doEndTag();
-
-		Object allowMethodAccess = stack.findValue("\u0023_memberAccess['allowStaticMethodAccess']");
-		assertNull(allowMethodAccess);
-
-		assertNull(session.get("foo"));
-
-		assertEquals("/team.action?aaa=1%24%7B%23session%5B%22foo%22%5D%3D%27true%27%7D" +
-                        "&amp;" +
-                        "aab=1%24%7B%23session%5B%22bar%22%5D%7D" +
-                        "&amp;" +
-                        "aac=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3D%27true%27%7D" +
-                        "&amp;" +
-                        "aad=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%7D" +
-                        "&amp;" +
-                        "aae%24%7B%23session%5B%22bar%22%5D%7D=1%24%7B%23session%5B%22bar%22%5D%7D"
-				, writer.toString()
-		);
-
-                // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
-                URLTag freshTag = new URLTag();
-                freshTag.setPerformClearTagStateForTagPoolingServers(true);
-                freshTag.setPageContext(pageContext);
-                assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
-                        "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                        strutsBodyTagsAreReflectionEqual(tag, freshTag));
-	}
+    public void testEmbeddedParamTagExpressionGetsEvaluatedCorrectly() throws Exception {
+        request.setRequestURI("/public/about");
+        request.setQueryString("section=team&company=acme inc");
+
+        tag.setAction("team");
+        tag.setIncludeParams("all");
+
+        tag.doStartTag();
+
+        Foo foo = new Foo("test");
+        stack.push(foo);
+
+        // include nested param tag
+        ParamTag paramTag = new ParamTag();
+        paramTag.setPageContext(pageContext);
+        paramTag.setName("title");
+        paramTag.setValue("%{title}");
+        paramTag.doStartTag();
+        paramTag.doEndTag();
+
+        tag.doEndTag();
+
+        assertEquals("/team.action?section=team&amp;company=acme+inc&amp;title=test", writer.toString());
+
+        // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
+        ParamTag freshParamTag = new ParamTag();
+        freshParamTag.setPageContext(pageContext);
+        assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
+                "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+
+        // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
+        URLTag freshTag = new URLTag();
+        freshTag.setPageContext(pageContext);
+        assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
+                "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
+    }
+
+    public void testEmbeddedParamTagExpressionGetsEvaluatedCorrectly_clearTagStateSet() throws Exception {
+        request.setRequestURI("/public/about");
+        request.setQueryString("section=team&company=acme inc");
+
+        tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
+        tag.setAction("team");
+        tag.setIncludeParams("all");
+
+        tag.doStartTag();
+        setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
+
+        Foo foo = new Foo("test");
+        stack.push(foo);
+
+        // include nested param tag
+        ParamTag paramTag = new ParamTag();
+        paramTag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
+        paramTag.setPageContext(pageContext);
+        paramTag.setName("title");
+        paramTag.setValue("%{title}");
+        paramTag.doStartTag();
+        setComponentTagClearTagState(paramTag, true);  // Ensure component tag state clearing is set true (to match tag).
+        paramTag.doEndTag();
+
+        tag.doEndTag();
+
+        assertEquals("/team.action?section=team&amp;company=acme+inc&amp;title=test", writer.toString());
+
+        // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
+        ParamTag freshParamTag = new ParamTag();
+        freshParamTag.setPerformClearTagStateForTagPoolingServers(true);
+        freshParamTag.setPageContext(pageContext);
+        assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
+                "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
+            strutsBodyTagsAreReflectionEqual(paramTag, freshParamTag));
+
+        // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
+        URLTag freshTag = new URLTag();
+        freshTag.setPerformClearTagStateForTagPoolingServers(true);
+        freshTag.setPageContext(pageContext);
+        assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
+                "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
+    }
+
+    public void testAccessToStackInternalsGetsHandledCorrectly() throws Exception {
+        Map<String, Object> params = new LinkedHashMap<>();
+        params.put("aaa", new String[]{"1${#session[\"foo\"]='true'}"});
+        params.put("aab", new String[]{"1${#session[\"bar\"]}"});
+        params.put("aac", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]='true'}"});
+        params.put("aad", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]}"});
+
+        request.setParameterMap(params);
+        request.setRequestURI("/public/about");
+        request.setQueryString("aae${%23session[\"bar\"]}=1%24%7B%23session%5B%22bar%22%5D%7D");
+        session.put("bar", "rab");
+
+        tag.setAction("team");
+        tag.setIncludeParams("all");
+
+        tag.doStartTag();
+        tag.doEndTag();
+
+        Object allowMethodAccess = stack.findValue("\u0023_memberAccess['allowStaticMethodAccess']");
+        assertNull(allowMethodAccess);
+
+        assertNull(session.get("foo"));
+
+        assertEquals("/team.action?aaa=1%24%7B%23session%5B%22foo%22%5D%3D%27true%27%7D" +
+                "&amp;" +
+                "aab=1%24%7B%23session%5B%22bar%22%5D%7D" +
+                "&amp;" +
+                "aac=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3D%27true%27%7D" +
+                "&amp;" +
+                "aad=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%7D" +
+                "&amp;" +
+                "aae%24%7B%23session%5B%22bar%22%5D%7D=1%24%7B%23session%5B%22bar%22%5D%7D"
+            , writer.toString()
+        );
+
+        // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
+        URLTag freshTag = new URLTag();
+        freshTag.setPageContext(pageContext);
+        assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
+                "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
+    }
+
+    public void testAccessToStackInternalsGetsHandledCorrectly_clearTagStateSet() throws Exception {
+        Map<String, Object> params = new LinkedHashMap<>();
+        params.put("aaa", new String[]{"1${#session[\"foo\"]='true'}"});
+        params.put("aab", new String[]{"1${#session[\"bar\"]}"});
+        params.put("aac", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]='true'}"});
+        params.put("aad", new String[]{"1${#_memberAccess[\"allowStaticMethodAccess\"]}"});
+
+        request.setParameterMap(params);
+        request.setRequestURI("/public/about");
+        request.setQueryString("aae${%23session[\"bar\"]}=1%24%7B%23session%5B%22bar%22%5D%7D");
+        session.put("bar", "rab");
+
+        tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
+        tag.setAction("team");
+        tag.setIncludeParams("all");
+
+        tag.doStartTag();
+        setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
+        tag.doEndTag();
+
+        Object allowMethodAccess = stack.findValue("\u0023_memberAccess['allowStaticMethodAccess']");
+        assertNull(allowMethodAccess);
+
+        assertNull(session.get("foo"));
+
+        assertEquals("/team.action?aaa=1%24%7B%23session%5B%22foo%22%5D%3D%27true%27%7D" +
+                "&amp;" +
+                "aab=1%24%7B%23session%5B%22bar%22%5D%7D" +
+                "&amp;" +
+                "aac=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%3D%27true%27%7D" +
+                "&amp;" +
+                "aad=1%24%7B%23_memberAccess%5B%22allowStaticMethodAccess%22%5D%7D" +
+                "&amp;" +
+                "aae%24%7B%23session%5B%22bar%22%5D%7D=1%24%7B%23session%5B%22bar%22%5D%7D"
+            , writer.toString()
+        );
+
+        // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
+        URLTag freshTag = new URLTag();
+        freshTag.setPerformClearTagStateForTagPoolingServers(true);
+        freshTag.setPageContext(pageContext);
+        assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
+                "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
+    }
 
     public void testIncludeEmptyParameters() throws Exception {
         request.setRequestURI("/public/about");
@@ -1990,23 +1983,23 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param4, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param4, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testIncludeEmptyParameters_clearTagStateSet() throws Exception {
@@ -2079,16 +2072,16 @@ public class URLTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param1, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param2, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param3, freshParamTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(param4, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(param4, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         URLTag freshTag = new URLTag();
@@ -2096,7 +2089,7 @@ public class URLTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     @Override
@@ -2116,14 +2109,14 @@ public class URLTagTest extends AbstractUITagTest {
     public static class Foo {
         private String title;
 
-		public Foo() {
-		}
+        public Foo() {
+        }
 
-		public Foo( String title ) {
-			this.title = title;
-		}
+        public Foo(String title) {
+            this.title = title;
+        }
 
-		public void setTitle(String title) {
+        public void setTitle(String title) {
             this.title = title;
         }
 
@@ -2158,7 +2151,7 @@ public class URLTagTest extends AbstractUITagTest {
         public String getUriFromActionMapping(ActionMapping mapping) {
             String baseUri = super.getUriFromActionMapping(mapping);
             HttpSession session = ServletActionContext.getRequest().getSession();
-            if (session.getAttribute("redBlue")==null) {
+            if (session.getAttribute("redBlue") == null) {
                 // We are red
                 session.setAttribute("redBlue", 0);
                 return baseUri + "-red";
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/FormTagTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/FormTagTest.java
index 6aa273574..0b0576272 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/FormTagTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/FormTagTest.java
@@ -64,7 +64,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithActionAttributeContainingQueryString_clearTagStateSet() throws Exception {
@@ -93,7 +93,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithActionAttributeContainingBothActionAndMethod() throws Exception {
@@ -116,10 +116,10 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
-        public void testFormWithActionAttributeContainingBothActionAndMethod_clearTagStateSet() throws Exception {
+    public void testFormWithActionAttributeContainingBothActionAndMethod_clearTagStateSet() throws Exception {
         FormTag tag = new FormTag();
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
         tag.setPageContext(pageContext);
@@ -142,7 +142,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithoutContext() throws Exception {
@@ -164,7 +164,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithoutContext_clearTagStateSet() throws Exception {
@@ -189,7 +189,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithContext() throws Exception {
@@ -210,7 +210,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithContext_clearTagStateSet() throws Exception {
@@ -234,7 +234,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithActionAttributeContainingBothActionAndDMIMethod() throws Exception {
@@ -261,8 +261,8 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
-    }    
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
+    }
 
     public void testFormWithActionAttributeContainingBothActionAndDMIMethod_clearTagStateSet() throws Exception {
         FormTag tag = new FormTag();
@@ -276,7 +276,7 @@ public class FormTagTest extends AbstractUITagTest {
         tag.setTitle("mytitle");
         tag.setOnsubmit("submitMe()");
 
-        ((DefaultActionMapper)container.getInstance(ActionMapper.class)).setAllowDynamicMethodCalls("true");
+        ((DefaultActionMapper) container.getInstance(ActionMapper.class)).setAllowDynamicMethodCalls("true");
 
         tag.doStartTag();
         setComponentTagClearTagState(tag, true);  // Ensure component tag state clearing is set true (to match tag).
@@ -290,7 +290,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithFocusElement() throws Exception {
@@ -310,7 +310,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithFocusElement_clearTagStateSet() throws Exception {
@@ -332,7 +332,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithActionAttributeContainingBothActionAndMethodAndNamespace() throws Exception {
@@ -358,7 +358,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithActionAttributeContainingBothActionAndMethodAndNamespace_clearTagStateSet() throws Exception {
@@ -386,7 +386,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testForm() throws Exception {
@@ -418,7 +418,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testForm_clearTagStateSet() throws Exception {
@@ -452,7 +452,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormId() throws Exception {
@@ -479,7 +479,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormId_clearTagStateSet() throws Exception {
@@ -508,7 +508,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormNoNameOrId() throws Exception {
@@ -537,10 +537,10 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
-     public void testFormNoNameOrId_clearTagStateSet() throws Exception {
+    public void testFormNoNameOrId_clearTagStateSet() throws Exception {
 
         request.setupGetServletPath("/testAction");
 
@@ -569,7 +569,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -610,14 +610,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -663,7 +663,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
@@ -671,7 +671,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -711,14 +711,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -763,7 +763,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
@@ -771,7 +771,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -810,14 +810,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -861,7 +861,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
@@ -869,10 +869,10 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
-/**
+    /**
      * Tests the numbers are formatted correctly to not break the javascript, using doubles
      */
     public void testFormWithCustomOnsubmitEnabledWithValidateEnabled4() throws Exception {
@@ -908,17 +908,17 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
-/**
+    /**
      * Tests the numbers are formatted correctly to not break the javascript, using doubles
      */
     public void testFormWithCustomOnsubmitEnabledWithValidateEnabled4_clearTagStateSet() throws Exception {
@@ -959,7 +959,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
@@ -967,7 +967,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     private void prepareMockInvocation() throws Exception {
@@ -1018,14 +1018,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -1064,7 +1064,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshParamTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(t, freshParamTag));
+            strutsBodyTagsAreReflectionEqual(t, freshParamTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshTag = new FormTag();
@@ -1072,7 +1072,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -1112,7 +1112,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -1128,7 +1128,7 @@ public class FormTagTest extends AbstractUITagTest {
      * </p>
      */
     public void testFormTagWithDifferentActionExtension_clearTagStateSet() throws Exception {
-        initDispatcher(new HashMap<String,String>(){{ 
+        initDispatcher(new HashMap<String, String>() {{
             put(StrutsConstants.STRUTS_ACTION_EXTENSION, "jspa");
             put("configProviders", TestConfigurationProvider.class.getName());
         }});
@@ -1155,7 +1155,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -1183,7 +1183,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     /**
@@ -1214,11 +1214,11 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithNamespaceDefaulting() throws Exception {
-        request.setupGetServletPath("/testNamespace/testNamespaceAction");
+        withRequestPath("/testNamespace/testNamespaceAction");
 
         TestAction testAction = (TestAction) action;
         testAction.setFoo("bar");
@@ -1239,11 +1239,11 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithNamespaceDefaulting_clearTagStateSet() throws Exception {
-        request.setupGetServletPath("/testNamespace/testNamespaceAction");
+        withRequestPath("/testNamespace/testNamespaceAction");
 
         TestAction testAction = (TestAction) action;
         testAction.setFoo("bar");
@@ -1267,11 +1267,11 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormTagForStackOverflowException1() throws Exception {
-        request.setRequestURI("/testAction");
+        withRequestPath("/testAction");
 
         FormTag form1 = new FormTag();
         form1.setPageContext(pageContext);
@@ -1300,18 +1300,18 @@ public class FormTagTest extends AbstractUITagTest {
         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ActionTag freshTag = new ActionTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormTagForStackOverflowException1_clearTagStateSet() throws Exception {
-        request.setRequestURI("/testAction");
+        withRequestPath("/testAction");
 
         FormTag form1 = new FormTag();
         form1.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1344,7 +1344,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ActionTag freshTag = new ActionTag();
@@ -1352,11 +1352,11 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormTagForStackOverflowException2() throws Exception {
-        request.setRequestURI("/requestUri");
+        withRequestPath("/requestUri");
 
         FormTag form1 = new FormTag();
         form1.setPageContext(pageContext);
@@ -1392,25 +1392,25 @@ public class FormTagTest extends AbstractUITagTest {
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         FormTag freshFormTag = new FormTag();
         freshFormTag.setPageContext(pageContext);
-         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
+        // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ActionTag freshTag = new ActionTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormTagForStackOverflowException2_clearTagStateSet() throws Exception {
-        request.setRequestURI("/requestUri");
+        withRequestPath("/requestUri");
 
         FormTag form1 = new FormTag();
         form1.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1455,10 +1455,10 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ActionTag freshTag = new ActionTag();
@@ -1466,11 +1466,11 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormTagForStackOverflowException3() throws Exception {
-        request.setRequestURI("/requestUri");
+        withRequestPath("/requestUri");
 
         FormTag form1 = new FormTag();
         form1.setPageContext(pageContext);
@@ -1519,26 +1519,26 @@ public class FormTagTest extends AbstractUITagTest {
         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form3, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form3, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ActionTag freshTag = new ActionTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormTagForStackOverflowException3_clearTagStateSet() throws Exception {
-        request.setRequestURI("/requestUri");
+        withRequestPath("/requestUri");
 
         FormTag form1 = new FormTag();
         form1.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1595,13 +1595,13 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form1, freshFormTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form2, freshFormTag));
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form3, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form3, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         ActionTag freshTag = new ActionTag();
@@ -1609,11 +1609,11 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormComponentIsRemoved() throws Exception {
-        request.setRequestURI("/requestUri");
+        withRequestPath("/requestUri");
 
         FormTag form = new FormTag();
         form.setPageContext(pageContext);
@@ -1631,11 +1631,11 @@ public class FormTagTest extends AbstractUITagTest {
         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshTag));
+            strutsBodyTagsAreReflectionEqual(form, freshTag));
     }
 
     public void testFormComponentIsRemoved_clearTagStateSet() throws Exception {
-        request.setRequestURI("/requestUri");
+        withRequestPath("/requestUri");
 
         FormTag form = new FormTag();
         form.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1655,13 +1655,11 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshTag));
+            strutsBodyTagsAreReflectionEqual(form, freshTag));
     }
 
     public void testFormWithNoAction() throws Exception {
-        request.setupGetServletPath("/");
-        request.setupGetContextPath("/");
-        request.setRequestURI("/foo.jsp");
+        withRequestPath("/foo.jsp");
 
         FormTag tag = new FormTag();
         tag.setPageContext(pageContext);
@@ -1676,13 +1674,11 @@ public class FormTagTest extends AbstractUITagTest {
         // FormTag has no non=default state set here, so it compares as equal with the default tag clear state as well.
         assertTrue("Tag state after doEndTag() under default tag clear state is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithNoAction_clearTagStateSet() throws Exception {
-        request.setupGetServletPath("/");
-        request.setupGetContextPath("/");
-        request.setRequestURI("/foo.jsp");
+        withRequestPath("/foo.jsp");
 
         FormTag tag = new FormTag();
         tag.setPerformClearTagStateForTagPoolingServers(true);  // Explicitly request tag state clearing.
@@ -1699,7 +1695,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithStaticAction() throws Exception {
@@ -1720,7 +1716,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithStaticAction_clearTagStateSet() throws Exception {
@@ -1744,7 +1740,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithActionAndExtension() throws Exception {
@@ -1766,7 +1762,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithActionAndExtension_clearTagStateSet() throws Exception {
@@ -1791,7 +1787,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testFormWithTopLabelPosition() throws Exception {
@@ -1818,14 +1814,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     public void testFormWithTopLabelPosition_clearTagStateSet() throws Exception {
@@ -1857,7 +1853,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
@@ -1865,7 +1861,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     public void testFormWithTopLabelPositionWithElementOverride() throws Exception {
@@ -1893,14 +1889,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     public void testFormWithTopLabelPositionWithElementOverride_clearTagStateSet() throws Exception {
@@ -1933,7 +1929,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
@@ -1941,7 +1937,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     public void testFormWithTopLabelPositionCssXhtml() throws Exception {
@@ -1968,14 +1964,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     public void testFormWithTopLabelPositionCssXhtml_clearTagStateSet() throws Exception {
@@ -2007,7 +2003,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
@@ -2015,7 +2011,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     public void testFormWithTopLabelPositionWithElementOverrideCssXhtml() throws Exception {
@@ -2043,14 +2039,14 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     public void testFormWithTopLabelPositionWithElementOverrideCssXhtml_clearTagStateSet() throws Exception {
@@ -2083,7 +2079,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshFormTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(form, freshFormTag));
+            strutsBodyTagsAreReflectionEqual(form, freshFormTag));
 
         // Basic sanity check of clearTagStateForTagPoolingServers() behaviour for Struts Tags after doEndTag().
         TextFieldTag freshTag = new TextFieldTag();
@@ -2091,7 +2087,7 @@ public class FormTagTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(text, freshTag));
+            strutsBodyTagsAreReflectionEqual(text, freshTag));
     }
 
     @Override
diff --git a/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java b/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
index f42fdbccf..ad28ee4bd 100644
--- a/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
+++ b/core/src/test/java/org/apache/struts2/views/jsp/ui/TextfieldTest.java
@@ -28,6 +28,7 @@ import java.util.Map;
 
 
 /**
+ *
  */
 public class TextfieldTest extends AbstractUITagTest {
 
@@ -37,7 +38,7 @@ public class TextfieldTest extends AbstractUITagTest {
      * String, String[])} as properties to verify.<br> This implementation extends testdata from AbstractUITag.
      *
      * @return A Map of PropertyHolders values bound to {@link org.apache.struts2.views.jsp.AbstractUITagTest.PropertyHolder#getName()}
-     *         as key.
+     * as key.
      */
     @Override
     protected Map<String, PropertyHolder> initializedGenericTagTestProperties() {
@@ -81,7 +82,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrors_clearTagStateSet() throws Exception {
@@ -110,7 +111,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoLabelJsp() throws Exception {
@@ -134,7 +135,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoLabelJsp_clearTagStateSet() throws Exception {
@@ -161,7 +162,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testLabelSeparatorJsp() throws Exception {
@@ -187,7 +188,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testLabelSeparatorJsp_clearTagStateSet() throws Exception {
@@ -216,7 +217,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNoLabelFtl() throws Exception {
@@ -257,7 +258,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testSimple_clearTagStateSet() throws Exception {
@@ -284,13 +285,13 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testWW5125() throws Exception {
         TestAction testAction = (TestAction) action;
 
-        for(String fieldName : new String[] {"clone", "size", "clear", "values", "hashCode", "isEmpty", "keySet", "entrySet"}) {
+        for (String fieldName : new String[]{"clone", "size", "clear", "values", "hashCode", "isEmpty", "keySet", "entrySet"}) {
             testAction.addFieldError(fieldName, fieldName + " error");
 
             TextFieldTag tag = new TextFieldTag();
@@ -304,7 +305,7 @@ public class TextfieldTest extends AbstractUITagTest {
             freshTag.setPageContext(pageContext);
             assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                     "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                    strutsBodyTagsAreReflectionEqual(tag, freshTag));
+                strutsBodyTagsAreReflectionEqual(tag, freshTag));
         }
 
         verify(TextFieldTag.class.getResource("Textfield-WW-5125.txt"));
@@ -313,7 +314,7 @@ public class TextfieldTest extends AbstractUITagTest {
     public void testWW5125_clearTagStateSet() throws Exception {
         TestAction testAction = (TestAction) action;
 
-        for(String fieldName : new String[] {"clone", "size", "clear", "values", "hashCode", "isEmpty", "keySet", "entrySet"}) {
+        for (String fieldName : new String[]{"clone", "size", "clear", "values", "hashCode", "isEmpty", "keySet", "entrySet"}) {
             testAction.addFieldError(fieldName, fieldName + " error");
 
             TextFieldTag tag = new TextFieldTag();
@@ -330,7 +331,7 @@ public class TextfieldTest extends AbstractUITagTest {
             freshTag.setPageContext(pageContext);
             assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                     "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                    strutsBodyTagsAreReflectionEqual(tag, freshTag));
+                strutsBodyTagsAreReflectionEqual(tag, freshTag));
         }
 
         verify(TextFieldTag.class.getResource("Textfield-WW-5125.txt"));
@@ -359,7 +360,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testSimple_recursionTest_clearTagStateSet() throws Exception {
@@ -388,7 +389,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testSimple_recursionTestNoValue() throws Exception {
@@ -411,7 +412,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testSimple_recursionTestNoValue_clearTagStateSet() throws Exception {
@@ -437,7 +438,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testHtml5EmailTag() throws Exception {
@@ -461,7 +462,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testHtml5EmailTag_clearTagStateSet() throws Exception {
@@ -488,7 +489,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionBottom() throws Exception {
@@ -515,7 +516,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionBottom_clearTagStateSet() throws Exception {
@@ -545,7 +546,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionTop() throws Exception {
@@ -572,7 +573,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionTop_clearTagStateSet() throws Exception {
@@ -602,7 +603,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequiredLabelPositionDefault() throws Exception {
@@ -627,7 +628,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequiredLabelPositionDefault_clearTagStateSet() throws Exception {
@@ -655,7 +656,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequiredLabelPositionRight() throws Exception {
@@ -681,7 +682,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequiredLabelPositionRight_clearTagStateSet() throws Exception {
@@ -710,7 +711,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testRequiredLabelPositionLeft() throws Exception {
@@ -736,7 +737,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
 
@@ -766,7 +767,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionBottomCssXhtmlTheme() throws Exception {
@@ -794,7 +795,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionBottomCssXhtmlTheme_clearTagStateSet() throws Exception {
@@ -825,7 +826,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionTopCssXhtmlTheme() throws Exception {
@@ -853,7 +854,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testErrorPositionTopCssXhtmlTheme_clearTagStateSet() throws Exception {
@@ -884,7 +885,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNameEvaluation() throws Exception {
@@ -906,7 +907,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertFalse("Tag state after doEndTag() under default tag clear state is equal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
     public void testNameEvaluation_clearTagStateSet() throws Exception {
@@ -931,7 +932,7 @@ public class TextfieldTest extends AbstractUITagTest {
         freshTag.setPageContext(pageContext);
         assertTrue("Tag state after doEndTag() and explicit tag state clearing is inequal to new Tag with pageContext/parent set.  " +
                 "May indicate that clearTagStateForTagPoolingServers() calls are not working properly.",
-                strutsBodyTagsAreReflectionEqual(tag, freshTag));
+            strutsBodyTagsAreReflectionEqual(tag, freshTag));
     }
 
 }