共享库上的@FacesComponent

@FacesComponent on shared library

我正在尝试在 Websphere 8.5 上使用自定义 jsf 组件。 组件 class 用 @FacesComponent 注释。

该组件位于服务器上的共享库 jar 中。我已经在 jar META-INF 文件夹中有一个 faces-config。

如果 jar 在我的 ear 文件中,它会按预期工作,但是当它 在 sharedlib 上它给我 "Undefined component type MyUIActionList" 错误。

关于如何使这项工作有任何想法吗?

Web 片段 JAR 属于 WAR/WEB-INF/lib绝对不属于 EAR/lib 也不属于 Server/lib

另见 a.o。 Servlet 3.0 specification 的第 8.1 章(强调我的):

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.

...

故事结束。