共享处理程序和支持 bean

发布于 2024-09-10 11:50:57 字数 346 浏览 2 评论 0原文

我想知道是否可以在共享的战争中拥有一个 JSF 处理程序和一些支持 bean。我说 war 是因为我有一个 jsp,它有一个处理程序和支持 bean,它们在不同应用程序之间共享,并且需要由 2 个不同的 war 文件调用。

从我之前的调查中,我发现 jar 中不可能有 jsf 片段(.jsp 和 .jspf),它必须处于战争状态。所以我在想是否可以将通用处理程序和bean也放入这个war中,然后导入或以某种方式从其他war文件中调用处理程序方法。

我知道如果它位于打包在 war 中的 jar 文件内,则可以轻松完成,但只是想知道是否可以使用现有的通用 war 文件而不是创建单独的 jar 文件。

谢谢。任何想法都非常感激。

I am wondering if it is possible to have a JSF handler and some of the backing beans in a war that is shared. I say war because I have a jsp which has a handler and backing beans that are shared between different applications, and need to be called by 2 different war files.

From my earlier investigation I found that it is not possible to have jsf fragments (.jsp and .jspf) in a jar, it has to be in a war. So I am thinking is it possible to put the common handler and beans in this war too and then import or somehow call the handler methods from the other war files.

I know it can be done easily if it was inside a jar file which is packaged in the war, but just wondering if instead of creating a separate jar file I can use the existing common war file.

Thanks. Any ideas much appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浅黛梨妆こ 2024-09-17 11:50:57

也可以将支持代码处理程序和 bean 放入战争中。然而,由于我需要从两场不同的战争中调用它,所以它应该放在一个罐子里。

无论如何,我们决定采取不同的方法,因为这并不完全成功。

It is possible to put the supporting code handlers and beans in the war as well. However since I need it to be called from 2 different wars it should be in a jar.

We decided to take a different approach anyways as this was not exactly successful.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文