How to update Mojarra version in GlassFish

前端 未结 1 953
挽巷
挽巷 2020-11-28 09:59

I want to update my JSF application to use Mojarra version 2.1.8. I added these lines into the POM file of the WAR package:


    

        
相关标签:
1条回答
  • 2020-11-28 10:59

    GlassFish itself already ships with JSF bundled which get by default classloading precedence over the one bundled in the webapp. You basically need to tell GlassFish to use the webapp bundled JSF instead.

    Edit the webapp's /WEB-INF/glassfish-web.xml (or /WEB-INF/sun-web.xml if you're using one of the first GF3 versions) to add the following two entries:

    <class-loader delegate="false" />
    <property name="useBundledJsf" value="true" />
    

    GlassFish will then use the webapp bundled JSF instead.

    Alternatively, if you have full admin control over GlassFish, then you can also copy it in the /glassfish/modules directory, replacing the older version, so that it get applied on all webapps.

    0 讨论(0)
提交回复
热议问题