Search code examples
jsfquarkusmyfaces

Context params ignored from web.xml by Myfaces with Quarkus


I'm working with quarkus and myfaces and I've stumbled into a few ViewExpiredException. Because my application heavily relies on @Viewscoped beans I wanted to check the number of NUMBER_OF_VIEWS_IN_SESSION and NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION and it seems these <context-param> are ignored from the web.xml file.

I've made a minimal 'working' example here : https://github.com/Pilpin/mwe-quarkus-myfaces, it's an extremely simple app which just shows the values with the #{initParam['x']} el expression.

What I gather from this simple test is :

  • javax.faces.PROJECT_STAGE is ignored from web.xml but read from application.properties if present
  • org.apache.myfaces.USE_LAMBDA_METAFACTORY and org.apache.myfaces.EARLY_FLUSH_ENABLED and some others are read from web.xml
  • org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION and org.apache.myfaces.NUMBER_OF_SEQUENTIAL_VIEWS_IN_SESSION are ignored but even more, the values obtained are not the default values from MyFaces (resp. 20 and 4, and I get 15 and 3, see https://myfaces.apache.org/#/core23next)

Would you have an idea of what is happening and how to fix it ?

Thanks.


Solution

  • i set some optimized params via the quarkus deployment here: https://github.com/apache/myfaces/blob/2.3-next/extensions/quarkus/deployment/src/main/java/org/apache/myfaces/core/extensions/quarkus/deployment/MyFacesProcessor.java#L327

    please create a issue, so we can check why web.xml doesnt overwrite it. in worst case we have to remove this optimization.