jsppropertiesjboss-portal

Using Jboss Portal, How do I retrieve page properties in a jsp?


Using Jboss portal, how do I retrieve the page properties in a jsp?

I've declared my page like that in *-object.xml file:

<page>
  <page-name>MyPage</page-name>
  <properties>
    <property>
      <name>layout.id</name>
      <value>generic</value>
    </property>
    <property>
      <name>hidePanel</name>
      <value>true</value>
    </property>
  </properties>
</page>

And I would like to have access to hidePanel property in the jsp file of generic layout.


Solution

  • I've found the answer.

    Retrieve page properties from a jsp:

    <%
      PageResult pageResult = (PageResult) request.getAttribute("PAGE");
      boolean hidePanel = Boolean.valueOf(pageResult.getProperty("hidePanel")));
    %>