You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Oleg Gorobets (JIRA)" <ji...@apache.org> on 2008/02/23 14:29:48 UTC

[jira] Commented: (WW-2504) Request get parameters are included into the result URL even though the request is PortletRequest

    [ https://issues.apache.org/struts/browse/WW-2504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43343#action_43343 ] 

Oleg Gorobets commented on WW-2504:
-----------------------------------

Portlet 2.0 spec allows to choose whether to include current parameters to the URL or not with a special tag attribute (copyCurrentRenderParameters) so it's better to leave an option for it. However the default implementation should NOT include current params.

> 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
>
> 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.