-
1. Re: facesContext null when deploying in Wildfly 10
davidjgomez Mar 16, 2016 11:50 AM (in response to davidjgomez)Hi!
In case someone is interested, we found a solution for this. Sadly we couldn't make it work with myfaces-2.1.12, we just unistalled it to prove the native installation of Wildfly (we tried to use MyFaces because we used it from the very beginning of the project), however it wasn't a complete solution because we have this kind of context: http://ipaddress:8080/myApp/faces/views/homepage.xhtml and with this JSF implementation, it works without the /faces part which raises other issues to us.
What we finally did was to replace the native JSF implementation of Wildfly 10 with Mojarra:
* Uninstall MyFaces (with uninstaller or manually)
* Modify standalone.xml to use the default implementation, it must be like this: <subsystem xmlns="urn:jboss:domain:jsf:1.0"/>
* Change the API Jar in $WILDFLY_HOME/modules/system/layers/base/javax/faces/api/main with jsf-api-2.2.13.jar (Mojarra) and update module.xml to reference it
* Change the IMPL Jar in $WILDFLY_HOME/modules/system/layers/base/com/sun/jsf-impl/main with jsf-impl-2.2.13.jar (Mojarra) and update module.xml to reference it
* Restart Wildfly and that's it!
Hope it helps someone!
David