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

Unable to evaluate JSP PageContext expression

    Details

      Description

      A regression has been introduced into Liferay Portal 7.0.0 CE GA4 that was not present in Liferay Portal 7.0.0 CE GA3. Specifically, JSPs with an EL expression are not being evaluated.

      The JSR 378 TCK contains a JSP based JSF view that looks like the following:

      singleRequestAfterViewContextTest.jsp
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
      <%@ page contentType="text/html;charset=UTF-8" %>
      <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
      <f:view />
      <table>
      	<tbody>
      		<tr>
      			<td><span>${test.renderTestResult}</span></td>
      		</tr>
      	</tbody>
      </table>
      

      The JSP compiler compiles the EL expression ${test.renderTestResult} to the following:

      /singleRequestAfterContentTest_jsp.java
      out.write((java.lang.String) org.apache.jasper.runtime.PageContextImpl.evaluateExpression("${test.renderTestResult}", java.lang.String.class, (PageContext)_jspx_page_context, null));
      

      The return value of the call to evaluateExpression is either returning null or "" (an empty String).

      Steps to Reproduce:

      1. Deploy attached com.liferay.faces.test.bridge.tck.main.portlet-4.1.0.war to Liferay Portal 7.0.0 CE GA4

      2. Create a new portal page

      3. Add the portlet named chapter6_2_1Tests-renderContentAfterViewTest-portlet to the page

      Expected Results

      The portlet renders the following content:

      <table>
      <tr>
      <td><span>chapter6_2_1Tests-renderContentAfterViewTest-portlet
      Test: renderContentAfterViewTest	Status: SUCCESS
      Detail:
      Content Rendered After View.</span><td>
      </tr>
      </table>
      

      Actual Results

      The portlet renders an empty table with nothing in between the <span>...</span>:

      <table>
      <tr>
      <td><span></span><td>
      </tr>
      </table>
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                3 years, 17 weeks, 6 days ago

                Packages

                Version Package
                7.0.0 DXP FP14
                7.0.0 DXP SP3
                7.0.3 CE GA4
                7.0.X EE
                7.1.X
                Master