Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1268

jsf2-jsp-portlet renders blank output when deployed under Pluto

    Details

      Description

      At first I thought it was related to FACES-1267, but it turns out that it was a different problem altogether. This was really difficult to figure out because Apache Tomcat was swallowing an exception!

      Background:

      Since portletViewMode.jspx is technically an XML file, the Jasper compiler was generating portletViewMode_jspx.java file that contained the following:

      response.setContentType("text/xml;charset=UTF-8");

      This was ultimately calling back into a Pluto PortletResponse implementation, which threw an exception for all types other than text/xhtml, and Apache Tomcat swallowed it. So the JSP failed to execute anything after that line.

      The solution is to add the following JSP directive needs to each JSPX page:

      <jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />

      That will end up causing the Jasper compiler to generate the following instead:

      response.setContentType("text/html;charset=UTF-8");

        Attachments

          Activity

            People

            • Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: