1

I am getting the following messsage in System out: "FacesMessage(s) have been enqueued....".

The solution with Sun's JavaServer Faces implementation (1.2_07-b03-FCS) was to add this to web.xml:

<context-param>
    <description>
    Set to true to disable the following warning message:
    FacesMessage(s) have been enqueued, but may not have been displayed
    </description>
    <param-name>com.ibm.ws.jsf.disableEnqueuedMessagesWarning</param-name>
    <param-value>true</param-value>
</context-param>

But for some reason that solution does not work with this Implemenation that I am using Mojarra (1.2_15-b01-FCS).

This document says I need to simply change the logger of RenderResponsePhase.
Faces Message(s) habe been encoded...

Essentially, I think I am asking is what is the logger class I need to configure for the RenderResponsePhase.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
JeffJak
  • 2,008
  • 5
  • 28
  • 40

1 Answers1

5

That context parameter is specific to IBM's Faces Client Framework which is part of WebSphere. But you seem to be not using it at all. There's no point of adding that context parameter. Remove it altogether.

Mojarra uses java.util.logging API as loggers. The logger name of the JSF lifecycle logger (which the RenderResponsePhase is using) is:

javax.enterprise.resource.webcontainer.jsf.lifecycle

The loggers are configureable by JRE/lib/logging.properties file. You first need to determine what JRE your server environment is using (note: the JDK has also a JRE!) and then edit its JRE/lib/logging.properties file accordingly to add the following line:

javax.enterprise.resource.webcontainer.jsf.lifecycle.level = WARNING

This sets the loggable level one up to "WARNING". The "FacesMessage(s) have been enqueued" message is an namely an "INFO". You need to restart the server (and the IDE, if any!) for the change to take effect.

I however wonder how useful it is to disable that. The root cause of the "problem" which you're trying to hide might better have been solved differently.

BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
  • I wonder then if, say, for Tomcat 7.0.22 if it would be possible to add that line in conf/logging.properties to avoid the messages on every Tomcat instance. A quick check doesn't seem to work. – Pixel Nov 04 '11 at 13:45
  • @Pixel: add this VM argument to Tomcat startup: `-Djava.util.logging.config.file=/path/to/tomcat/conf/logging.properties`. Otherwise the JRE one will be used. – BalusC Nov 04 '11 at 13:49
  • 1
    More good info (also by BalusC) is [here](http://stackoverflow.com/questions/7363704/jsf2-logs-with-tomcat). – Pixel Nov 04 '11 at 14:31