Commits

Anonymous committed 874cac8

URL Tag includeParams default attribute value should be configurable
o added new property and implemented URL component logic
Issue number: WW-1346
Obtained from:
Submitted by:
Reviewed by:

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

Comments (0)

Files changed (3)

src/java/com/opensymphony/webwork/WebWorkConstants.java

 
     public static final String WEBWORK_URL_HTTP_PORT = "webwork.url.http.port";
     public static final String WEBWORK_URL_HTTPS_PORT = "webwork.url.https.port";
+    public static final String WEBWORK_URL_INCLUDEPARAMS = "webwork.url.includeParams";
 
     public static final String WEBWORK_OBJECTFACTORY = "webwork.objectFactory";
     public static final String WEBWORK_OBJECTTYPEDETERMINER = "webwork.objectTypeDeterminer";

src/java/com/opensymphony/webwork/components/URL.java

 import com.opensymphony.webwork.views.util.UrlHelper;
 import com.opensymphony.webwork.dispatcher.DispatcherUtils;
 import com.opensymphony.webwork.WebWorkException;
+import com.opensymphony.webwork.WebWorkConstants;
+import com.opensymphony.webwork.config.Configuration;
 import com.opensymphony.xwork.util.OgnlValueStack;
 import com.opensymphony.xwork.util.XWorkContinuationConfig;
 import com.opensymphony.xwork.ActionContext;
         // this at start so body params can override any of these they wish.
         try {
             // ww-1266
-            String includeParams = GET;
+            String includeParams =
+                    Configuration.isSet(WebWorkConstants.WEBWORK_URL_INCLUDEPARAMS) ?
+                            Configuration.getString(WebWorkConstants.WEBWORK_URL_INCLUDEPARAMS).toLowerCase() : GET;
 
             if (this.includeParams != null) {
                 includeParams = findString(this.includeParams);

src/java/com/opensymphony/webwork/default.properties

 webwork.url.http.port = 80
 webwork.url.https.port = 443
 
+### possible values are: none, get or all
+webwork.url.includeParams = get
+
 ### Load custom default resource bundles
 # webwork.custom.i18n.resources=testmessages,testmessages2