问题
I'm trying to use a custom jsf component on Websphere 8.5. The component class is annotated with @FacesComponent.
The component is on a shared lib jar on the server. I already have an faces-config inside the jar META-INF folder.
If the jar is inside my ear file it works as expected, but when its on a sharedlib it gives me "Undefined component type MyUIActionList" error.
Any ideas on how to make this work?
回答1:
Web fragment JARs belong in WAR/WEB-INF/lib
and absolutely not in EAR/lib
nor Server/lib
.
See also a.o. chapter 8.1 of Servlet 3.0 specification (emphasis mine):
8.1 Annotations and pluggability
In a web application, classes using annotations will have their annotations processed only if they are located in the
WEB-INF/classes
directory, or if they are packaged in a jar file located inWEB-INF/lib
within the application....
End of story.
来源:https://stackoverflow.com/questions/30535024/facescomponent-on-shared-library