[jira] [Updated] (PLUTO-650) Objects such as portletConfig are available during JSP EL resolution even when portlet:defineObjects is not present

"Neil Griffin (JIRA)" <[email protected]>
Newsgroups gmane.comp.jakarta.pluto.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/PLUTO-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Griffin updated PLUTO-650:
-------------------------------
    Description: 
The {{<portlet:defineObjects/>}} is a feature that enables the JSP pageContext to have attributes like {{portletConfig}}. One benefit of this feature is that JSP EL expressions can resolve these objects. For example:
{code:html}
<span>portletConfig=${portletConfig}</span>
{code}
If {{<portlet:defineObjects/>}} is missing from a JSP, then the objects should not appear as JSP pageContext attributes, and EL resolution should return {{null}}.

The JSR 378 TCK contains a test that expects the lack of {{<portlet:defineObjects/>}} to mean that the JSP pageContext attributes will not contain values like {{portletConfig}}.

h3. Steps to Reproduce:

- Create a portlet that contains the following JSP content:
{code:html}
<span>portletConfig=${portletConfig}</span>
{code}
- Deploy the portlet
- Add the portlet to a Pluto portal page
- View the Pluto portal page

(/) Expected Result: 
{noformat}
portletConfig=
{noformat}
(x) Actual Result:
{noformat}
portletConfig=DriverPortletConfigImpl@8407
{noformat}

The reason why the value is found, even without the presence of {{<portlet:defineObjects/>}} is because the WeldELResolver is present in the JSP ELResolver chain and knows how to resolve the value.


  was:
The {{<portlet:defineObjects/>}} is a feature that enables the JSP pageContext to have attributes like {{portletConfig}}. One benefit of this feature is that JSP EL expressions can resolve these objects. For example:
{code:html}
<span>portletConfig=${portletConfig}</span>
{code}
If {{<portlet:defineObjects/>}} is missing from a JSP, then the objects should not appear as JSP pageContext attributes, and EL resolution should fail.

The JSR 378 TCK contains a test that expects the lack of {{<portlet:defineObjects/>}} to mean that the JSP pageContext attributes will not contain values like {{portletConfig}}.

h3. Steps to Reproduce:

- Create a portlet that contains the following JSP content:
{code:html}
<span>portletConfig=${portletConfig}</span>
{code}
- Deploy the portlet
- Add the portlet to a Pluto portal page
- View the Pluto portal page

(/) Expected Result: 
{noformat}
portletConfig=
{noformat}
(x) Actual Result:
{noformat}
portletConfig=DriverPortletConfigImpl@8407
{noformat}

The reason why the value is found, even without the presence of {{<portlet:defineObjects/>}} is because the WeldELResolver is present in the JSP ELResolver chain and knows how to resolve the value.



> Objects such as portletConfig are available during JSP EL resolution even when portlet:defineObjects is not present
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: PLUTO-650
>                 URL: https://issues.apache.org/jira/browse/PLUTO-650
>             Project: Pluto
>          Issue Type: Bug
>          Components: portlet container
>    Affects Versions: 3.0.0
>            Reporter: Neil Griffin
>
> The {{<portlet:defineObjects/>}} is a feature that enables the JSP pageContext to have attributes like {{portletConfig}}. One benefit of this feature is that JSP EL expressions can resolve these objects. For example:
> {code:html}
> <span>portletConfig=${portletConfig}</span>
> {code}
> If {{<portlet:defineObjects/>}} is missing from a JSP, then the objects should not appear as JSP pageContext attributes, and EL resolution should return {{null}}.
> The JSR 378 TCK contains a test that expects the lack of {{<portlet:defineObjects/>}} to mean that the JSP pageContext attributes will not contain values like {{portletConfig}}.
> h3. Steps to Reproduce:
> - Create a portlet that contains the following JSP content:
> {code:html}
> <span>portletConfig=${portletConfig}</span>
> {code}
> - Deploy the portlet
> - Add the portlet to a Pluto portal page
> - View the Pluto portal page
> (/) Expected Result: 
> {noformat}
> portletConfig=
> {noformat}
> (x) Actual Result:
> {noformat}
> portletConfig=DriverPortletConfigImpl@8407
> {noformat}
> The reason why the value is found, even without the presence of {{<portlet:defineObjects/>}} is because the WeldELResolver is present in the JSP ELResolver chain and knows how to resolve the value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.