Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-3184

After applying the patch from LPS-3082 as a side effect request parameters become namespaced, making portlets not find it's parameters


    • Type: Bug
    • Status: Closed
    • Resolution: Won't Fix
    • Affects Version/s: 5.1.2, 5.2.2
    • Fix Version/s: --Sprint 12/11
    • Component/s: None
    • Labels:
    • Branch Version/s:


      When applying the patch submitted in LPS-3082 (http://issues.liferay.com/browse/LPS-3082) the portlet container as a side effect will namespace the request parameters. That makes for example Seam based portlets to fail to find neccesary parameters.

      This happens on lines 591 - 613 (on version 5.2.2) in com.liferay.portlet.PortletRequestImpl. If the portlet is not a faces portlet then the request parameters are set with short name, i.e. with the namespace stripped but on a faces portlet the namespace is kept.

      I'm not so sure this is the correct behaviour, from standard perspective, as the portlet spec states that it's the portlet that handles adding namespace to parameters at it's own choise and if added then also remove on reception. I don't find anything in JSR-301 that specifies that Faces portlets should receive namespaced parameters, where chapters 6.6 and 8.7 touches the subject.

      One way to solve this issue is to modify com.liferay.portal.servlet.NamespaceServletRequest. It already has support in getParameter method to look for the parameter name prefixed with namespace, however FacesContext uses getParameterMap. The attached patch adds the missing methods to retrieve a parameter map where the parameters are present with and without namespaced names for compatibility reasons.

      While this patch solve the problem a few questionmarks remains:

      • Is this the correct way to solve the problem or should it be done already in PortletRequestImpl?
      • Should also the setParameter methods also be overridden so that it adds namespace except for reserved names?




            • Votes:
              0 Vote for this issue
              1 Start watching this issue


              • Created:
                Days since last comment:
                10 years, 22 weeks, 5 days ago


                Version Package
                --Sprint 12/11