jboss / mojarra

Fork of Mojarra
10 stars 41 forks source link

[2.3.14.SP] [JBEAP-26020] Do not override application-specified com.sun.faces.enableDistributable value #97

Closed sudeshnas93 closed 11 months ago

sudeshnas93 commented 1 year ago

Issue: https://issues.redhat.com/browse/JBEAP-26020

Mojarra defines a number of initialization parameters. While "com.sun.faces.enableDistributable" is one of them, Mojarra automatically overrides any existing setting provided by the application. If a web application wanted explicitly disable this for a distributable web application, it would normally add a servlet context parameter within web.xml. e.g.

<web-app>
  <distributable/>
  <context-param>
    <param-name>com.sun.faces.enableDistributable</param-name>
    <param-value>false</param-value>
  </context-param>
</web-app>

However, the ConfigureListener auto-enables the com.sun.faces.enableDistributable configuration property whenever it see that the tag in web.xml, overriding any custom setting. I would expect Mojarra to respect the setting defined by the application, and only provide a default value if no value was specified.

lvydra commented 11 months ago

Hi @jasondlee, https://github.com/eclipse-ee4j/mojarra/pull/5363 should be merged now.

jasondlee commented 11 months ago

Looks good. Thanks @sudeshnas93, @lvydra.