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!
Since portletViewMode.jspx is technically an XML file, the Jasper compiler was generating portletViewMode_jspx.java file that contained the following:
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:
That will end up causing the Jasper compiler to generate the following instead: