I've been trying to get this setup running for a couple of days now but still no luck. Here's the test application i've been using:
@Named
@RequestScoped
public class Test {
private String test = "test";
public String getTest() { return test; }
public void setTest(String test) { this.test = test; }
}
And in the jsf page:
<h:outputText value="#{test.test}"/>
Running this sample without MyFaces works fine (renders "test" like it should), but when i deploy MyFaces in the WAR file and do the necessary configuration within weblogic.xml CDI seems to stop working (or at least, the integration bewteen JSF and CDI) and nothing is displayed in the output html. MyFaces itself seems to be ok, though.
My basic configuration is as follows:
Weblogic.xml contents:
<prefer-application-packages>
<package-name>javax.faces.*</package-name>
<package-name>com.sun.faces.*</package-name>
<package-name>com.bea.faces.*</package-name>
</prefer-application-packages>
<prefer-application-resources>
<resource-name>javax.faces.*</resource-name>
<resource-name>com.sun.faces.*</resource-name>
<resource-name>com.bea.faces.*</resource-name>
<resource-name>META-INF/services/javax.servlet.ServletContainerInitializer</resource-name>
<resource-name>META-INF/services/com.sun.faces.spi.FacesConfigResourceProvider</resource-name>
</prefer-application-resources>
What i've learned so far:
Things i've tried so far:
Is it really that hard to use MyFaces on WL12c while preserving CDI support or am i just missing the obvious ? Thanks for any help.
I'm afraid there is no way to do it. The weld glue code needs to be there. Those tiny little integration layer that is part of the wls deployable libraries for jsf isn't available for myfaces ....