@FacesComponent on shared library

早过忘川 提交于 2019-12-20 04:13:11

问题


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 in WEB-INF/lib within the application.

...

End of story.



来源:https://stackoverflow.com/questions/30535024/facescomponent-on-shared-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!