我可以将 java portlet 添加到现有的 java Web 应用程序吗?

发布于 2024-08-29 21:15:11 字数 349 浏览 5 评论 0原文

我正在构建一个 Web 应用程序,该应用程序使用 jboss-seam 和 jsf、facelets 和 rich faces,在 jboss AS 5.1 之上运行。

我想添加一个 portlet 区域,我可以在其中添加我自己的 portlet,但是根据我得到的信息(阅读论坛和文档),我需要运行一个 portlet 容器/门户(例如 liferay 或 gatewayin)。但我不想运行门户网站。我只想要某种可以嵌入 portlet 的控件(类似于 iFrame)。

这是真的还是我听错了?

如果我错了,如何在我的 web 应用程序中添加一个可以添加 portlet 的区域?

谢谢

最诚挚的问候。

I'm building a webapp that uses jboss-seam with jsf, facelets and rich faces, running on top of jboss AS 5.1.

I would like to add a portlet area where I could add my own portlets, but from what I got (reading forums and documentation) I need to be running a portlet container/portal (something like liferay or gatein). But I don't want to be running a portal. I just want some kind of control where I can embed a portlet (something like an iFrame).

Is this true or I got it wrong?

If I'm wrong, how can I add an area to my webapp where I can add a portlet?

Thanks

Best regards.

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

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

发布评论

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

评论(2

情何以堪。 2024-09-05 21:15:11

如果您正在寻找 JSR 286 (Portlet 2)JSR 168 (Portlet 1) 兼容的 portlet,您所阅读的内容是正确的。您需要一个 portlet 容器。 JBoss 曾经有 JBoss Portal,如果您专注于 JBoss 产品,它应该适合您的堆栈。事实上,您可以找到整个 JBoss Portal 和您正在使用的堆栈之间的桥梁。如果您决定需要一个门户并想要查看其他应用程序,我已成功运行 Liferay过去的JBoss。

同时,通过使用 iframe 或 div 以及 JavaScript 和后端编码,您可以获得外观行为类似于 portlet 的东西。通过更详细地了解您希望伪 Portlet 执行的操作,社区可以更具体地帮助您确定在现有代码中连接您自己的较小框架或尝试拥有某种更大的 Portlet 容器似乎更合理。如果您想重现所有 Portlet 1 或 2 规范,我会使用容器。如果你想重现一个迷你 iGoogle,你可以用 JS 和 HTML 做一些事情。

编辑:查看具有相同 portlet 标记的其他问题,我发现 jQuery UI Sortable - Portlet 演示可能只提供您正在寻找的类似 Portlet 的功能,而无需完整的 Portal 框架。当然,它确实引入了 jQuery UI。

If you are looking for a JSR 286 (Portlet 2) or JSR 168 (Portlet 1) compliant portlet, what you have read is correct. You need a portlet container. JBoss used to have JBoss Portal that should fit in your stack if you are focused on the JBoss products. In fact, you can find an entire bridge between JBoss Portal and the stack you are using. If you decide that you need a portal and want to look to other apps, I have successfully run Liferay on JBoss in the past.

At the same time, you can get something that looks and behaves like a portlet by using iframes or a div and JavaScript and back-end coding. With more specifics on what you want your pseudo-portlets to do, the community can more specifically help you figure out if wiring your own smaller framework within your existing code or attempting to have some sort of larger portlet container seems more reasonable. If you want to reproduce all of the Portlet 1 or 2 spec, I'd go with the container. If you want to reproduce a mini-iGoogle, you can probably do someting with JS and HTML.

EDIT: Looking through other questions with the same portlet tag, I found the jQuery UI Sortable - Portlets demo that might provide just the portlet-like features you are looking for without an entire Portal framework. It does, of course, pull in jQuery UI.

舞袖。长 2024-09-05 21:15:11

坦率地说,如果您不打算“全力以赴”使用 portlet,或者您希望嵌入的 portlet 特别复杂,那么我认为切换到 portlet 容器没有太大价值。

由于 JSF 是一个组件框架,因此“portlet”和“JSF 组件”之间的区别实际上更多的是意识形态而非实际技术(是的,开发模型不同,但不是很大)。您可能最好创建一个新的、高级的 JSF 组件来充当您的 portlet,而不是将 portlet 容器的全部重量和复杂性引入到您的应用程序中以提供单个服务。

Frankly, if you're not going to go "whole hog" with portlets, or the portlet you wish to embed is particularly sophisticated, I don't think there is much value to switching over to a portlet container.

With JSF being a component framework, the difference between a "portlet" and a "JSF component" are really more ideological than actually technical (yes, the development model is different, but not dramatically). You likely be better off create a new, high level, JSF component to act as your portlet than bringing in the whole weight and complexity of a portlet container in to your app for a single service.

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