eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
160 stars 109 forks source link

Applications cannot override "com.sun.faces.enableDistributable" behavior #5345

Closed pferraro closed 11 months ago

pferraro commented 11 months ago

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.

BalusC commented 11 months ago

Done, thank you for reporting the issue and providing PRs!