[ 
https://issues.apache.org/struts/browse/WW-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nils-Helge Garli resolved WW-2504.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2
         Assignee: Nils-Helge Garli

> Request get parameters are included into the result URL even though the 
> request is PortletRequest
> -------------------------------------------------------------------------------------------------
>
>                 Key: WW-2504
>                 URL: https://issues.apache.org/struts/browse/WW-2504
>             Project: Struts 2
>          Issue Type: Bug
>          Components: "New" API, Plugin - Portlet, Plugin - Tags
>    Affects Versions: 2.1.0
>         Environment: Struts 2.1.0, xwork 2.1.0, struts2-portlet-plugin-2.1.0. 
> Custom portlal implementation. 
>            Reporter: Vladimir Limansky
>            Assignee: Nils-Helge Garli
>             Fix For: 2.1.2
>
>
> Request get parameters are included to the portlet url. Portlet specification 
> says that only setParameter method should be used to add parameters while 
> building portlet URLs. 
> Consider org.apache.struts2.components.URL
> Let's compare the following methods: 
> 1. Struts 2.0.9 code:
>     private void includeGetParameters() {
>         if(!(Dispatcher.getInstance().isPortletSupportActive() && 
> PortletActionContext.isPortletRequest())) {
>             String query = extractQueryString();
>             mergeRequestParameters(value, parameters, 
> UrlHelper.parseQueryString(query));
>         }
>     }
> Pay attention, that parameters are not included in case of portlet request.
> 2. Struts 2.1.0 code: 
>     private void includeGetParameters() {
>       String query = extractQueryString();
>       mergeRequestParameters(value, parameters, 
> UrlHelper.parseQueryString(query));
>     }
> The parameters are always included.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to