eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
158 stars 107 forks source link

[2.3] Do not override application-specified "com.sun.faces.enableDistributable" value #5363

Closed sudeshnas93 closed 6 months ago

sudeshnas93 commented 7 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 7 months ago

Does this require the same deletion as same as #5347 ?

Indeed. It should be the exact same change.

sudeshnas93 commented 7 months ago

Code changes have been made accordingly. Please review.

mnriem commented 7 months ago

@sudeshnas93 Please make sure you use the same email as your Eclipse account so the ECA check passes

sudeshnas93 commented 7 months ago

I have used the same email address as that of Eclipse account and updated the ECA. Can this test be rerun again? Thanks.

lvydra commented 6 months ago

Hi @BalusC, could you please review the changes?