帮助 Liferay portlet、igoogle 等门户网站

发布于 2024-09-07 18:57:47 字数 306 浏览 1 评论 0原文

您好,我对 portlet 和门户完全陌生。我简要(非常简短)地了解了 portlet 的 jsr,安装了 liferay 并使用它的默认 portlet 进行操作,并为自己设置了一个 eclipse 工作环境,希望开发自己的小 portlet 模块。
我必须创建一个类似于 igoogle 的门户,以及 chrome 中的选项卡系统

我不知道从哪里开始,我对 Java 相当满意,并且已经完成了一些其他 J2EE 应用程序,但不知道从哪里开始真正了解门户/portlet 体系结构中的所有内容如何组合在一起(什么文件在哪里等),因此,如果你们能提供任何帮助,我们将不胜感激。

Hi i am completely new to portlets and portals. I have had a brief(very brief) look at the jsr for portlets, installed liferay played around with its default portlets and set myself up an eclipse working environment in the hope of developing my own little portlet module.

I have to create a portal similar to igoogle, and the tabs system in chrome

I am not sure where to start with and I am reasonably comfortable with Java and have done some other J2EE apps, but dont really know how everything fits together in portal/portlet architecture (what files where etc) so any assistance you guys could lend would be greatly appreciated.

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

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

发布评论

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

评论(3

森林迷了鹿 2024-09-14 18:57:47

您首先需要决定该 portlet 使用哪些技术。

portlet 规范假定使用普通 JSP/Servlet。不过,您可以通过相应的“粘合剂”来​​使用其他框架,例如 JSF、Struts、Spring 等。示例 portlet 中有各种技术的示例。

对于 JSF,这种粘合剂是 JSR-301 Portlet Bridge for JSF,然后您可以使用其他 JSF 组件套件。

我目前正在为 Liferay 开发一个基于 JSF 和 RichFaces 的 portlet,这似乎或多或少有效。到目前为止没有出现重大故障。

我不知道其他组件套件是否在 Liferay portlet 环境中得到很好的支持。另外,我认为 JSF 2.0 和 Portlet 规范 2.0 还不够成熟。因此我们决定坚持使用 JSF 1.x 和 Portlet 1.0。

You will first need to decide which technologies to use for the portlet.

The portlet specification assume usage of vanilla JSP / Servlet. You can however use other frameworks such as JSF, Struts, Spring, etc. using the corresponding "glue". There are examples for the various technologies in the sample portlets.

For JSF, this glue is the JSR-301 Portlet Bridge for JSF, then you can use other JSF component suites.

I'm currently working on a portlet for Liferay based on JSF and RichFaces, and that seems to works more or less. No major glitches so far.

I don't know if the other component suites are well supported in Liferay portlet environment. Also, I don't think JSF 2.0 and Portlet spec 2.0 are mature enough. So we decided to stick to JSF 1.x and Portlet 1.0.

夜夜流光相皎洁 2024-09-14 18:57:47

如果您致力于 Liferay,那么可以从 开始Liferay SDK。他们最近发布了一组 Eclipse 插件(Liferay IDE)似乎自动化了他们工具包的大部分打包(仍然基于 ANT - 据我所知,没有好的 Maven 资源 - 目前的工作已经被提出,但似乎仍然损坏/不完整)

对于一些 portlet 示例,您可以查看:https://lportal.svn.sourceforge.net/svnroot/lportal/plugins/trunk

我会警告您,Liferay portlet!= JSR-168/286 - 它们有一些扩展和超出规范中的约定,并且一些平台的处理默认值与您预期的不同(例如,首选项由多个用户共享)默认)。话虽如此,大多数/所有 portlet 容器也是如此。

If you're committed to Liferay, the place to start is the Liferay SDK. They recently released a set of Eclipse plugins (Liferay IDE) which seem to automate much of the packaging for their toolkits (still ANT based - no good Maven resources that I'm aware of - current work has been proposed, but still seems broken/incomplete)

For some samples of portlets you can look at: https://lportal.svn.sourceforge.net/svnroot/lportal/plugins/trunk

I would warn you, Liferay portlets != JSR-168/286 - they have some extensions, and conventions beyond what's in the spec, and some of the platform's handlings default to different values than you might expect (e.g. preferences are shared across multiple users by default). Having said that, the same is true of most/all portlet containers.

纸短情长 2024-09-14 18:57:47

我想您已经遇到过 Liferay Portal Server 作为一个开源免费门户服务器,并开始尝试 portlet 的东西。

就使用 portlet 而言,portlet 规范的最新版本是 JSR 286 (v2.0)。因此,所有使用 Struts、Spring、JSF、基本 portlet 创建的 portlet 都将遵循此规范作为基本原则。新规范提供了新功能(公共渲染参数、Portlet 间通信的事件)和新的 Portlet 生命周期阶段(资源、事件)以及基于 JSR 168 的 Portlet 所提供的其他功能。

但是,需要注意以下几点:相关框架:

  1. Struts 目前支持 JSR 168 portlet (v1.0),而不是 JSR 286。这是使用 Struts portlet 桥完成的。

  2. JSF 提供对 JSR 168 和 286 的支持,这也是通过使用 JSF Portlet 桥 (http://jcp.org/en/jsr/detail?id=301) 来实现的。< /p>

  3. Spring portlet框架是基于spring框架的。他们很容易合作。如果万一,您已经有 Spring 框架的经验,那么这个框架将非常容易遵循和开始。 Spring的最新版本是v3.1。这支持JSR 286并向后兼容。

大多数可用的功能基本上都由框架/桥涵盖,除了少数依赖于门户服务器配置的功能之外。 对于基于 Portal Server 的功能(例如 Liferay、WebSphere Portal 等),您需要查看服务器文档,以了解需要在 portlet.xml 和其他配置文件中声明的内容由服务器提及并为服务器提及。

我还推荐 Ashish Sarin 的书“Portlet In Action”,它从头开始解释了一些事情。

一切顺利。

I guess you have come across Liferay Portal Server as an open source free portal server to start experimenting with the portlet stuff.

As of working with portlets, the latest version of the portlets spec is JSR 286 (v2.0). As such, all the portlets which are created using Struts, Spring, JSF, basic portlets would follow this specification as the underlying principle. The new specification provides new features (public render parameters, events for inter-portlet communication) and new portlet lifecycles phases (resource, event) and other functionality than what was provided with portlets based on JSR 168.

However the following are to be observed for the relevant framework:

  1. Struts does support JSR 168 portlets (v1.0) and not JSR 286 as of today. This is accomplished using the Struts portlet bridge.

  2. JSF provides support for both JSR 168 and 286 and this is also accomplished using the JSF Portlet bridge (http://jcp.org/en/jsr/detail?id=301).

  3. Spring portlet framework is based on the spring framework. They are pretty easy to work with. If in case, you have experience with Spring framework already then this one would be very easy to follow and start with. The latest version in Spring is v3.1. This support JSR 286 and backward compatible.

Most of the features that work are basically covered by the frameworks/bridges except for few which are Portal server configuration dependant. For the features that work based on the Portal Server( e.g. Liferay, WebSphere Portal, etc.) you would need to go the server documentation in order to see what needs to be declared in portlet.xml and other configuration files as would be mentioned by and for the server.

I would also recommend the book "Portlets In Action" by Ashish Sarin which explains things from the ground up.

All the best.

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