I've successfully deployed my app on WebSphere Liberty Profile (16.0.0.3), but when I try to use it, I get the following exception:
java.lang.ClassNotFoundException: org.apache.myfaces.renderkit.html.HtmlFormRenderer
at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:488)
at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:271)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:466)
at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:438)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at pt.sibs.epms.ecc.renderer.HtmlFormRenderer.getRenderer(HtmlFormRenderer.java:54)
JSF 2.2 is enabled in server.xml:
<feature>jsf-2.2</feature>
And the class exists in:
wlp/lib/com.ibm.ws.jsf.2.2_1.0.14.jar
Regarding API type visibilty, both my shared library and application have spec,ibm-api,api,third-party
.
If I try to configure another implementation of MyFaces, I start getting ClassCastException
.
What do I need to change to make this work?
The jsf-2.2 feature doesn't expose the MyFaces implementation classes as api of any kind which is why the attempt to do a Class.forName isn't working.
Hi you should be able to implement your own Renderers by using a combination of the RendererWrapper and the RenderKitWrapper. These classes allow you to add specialized behavior to existing Renderer and RenderKit instances.