0

I'm doing a Web application using Spring 3.1.0.RELEASE, JSF 2.x (Mojarra), JPA 2 with Hibernate Provider. The application run on Tomcat 7.x.

I have a debug page, I would like to display all the properties of JSF like numberOfViewsInSession, numberOfLogicalViews, facelets.REFRESH_PERIOD, facelets.SKIP_COMMENTS...

I have found for javax.faces.PROJECT_STAGE

javax.faces.PROJECT_STAGE = #{facesContext.application.projectStage}

How to display this informations in a view ?

La Chamelle
  • 2,927
  • 4
  • 36
  • 54

1 Answers1

1

You're talking about context initializaition parameters as <context-param> in web.xml, right?

They're available by the implicit #{initParam} map in EL which refers under the covers to ExternalContext#getInitParameterMap(). So, this should do:

<c:forEach items="#{initParam}" var="entry">
    #{entry.key}=#{entry.value}<br/>
</c:forEach>

Note that <ui:repeat> can't be used as it doesn't support Map.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • numberOfViewsInSession and numberOfLogicalViews are not display. If they are not present in my web.xml. I suppose the JSF propreties can be accessed ? – La Chamelle Jun 25 '12 at 13:23