简体   繁体   English

是否可以将Java Portlet添加到现有的Java Web App?

[英]Can I add a java portlet to an existing java Web App?

I'm building a webapp that uses jboss-seam with jsf, facelets and rich faces, running on top of jboss AS 5.1. 我正在构建一个使用jboss-seam和jsf,facelets和丰富面孔的web应用程序,并在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). 我想在其中添加我自己的Portlet的地方添加一个Portlet区域,但是从我得到的内容(阅读论坛和文档)中,我需要运行一个Portlet容器/门户(诸如liferay或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). 我只想要某种控件,可以在其中嵌入portlet(类似于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? 如果我错了,如何在我的Web应用程序中添加可以添加Portlet的区域?

Thanks 谢谢

Best regards. 最好的祝福。

If you are looking for a JSR 286 (Portlet 2) or JSR 168 (Portlet 1) compliant portlet, what you have read is correct. 如果您正在寻找兼容JSR 286(Portlet 2)JSR 168(Portlet 1)的 portlet,那么您所读的内容是正确的。 You need a portlet container. 您需要一个Portlet容器。 JBoss used to have JBoss Portal that should fit in your stack if you are focused on the JBoss products. 如果您专注于JBoss产品,那么JBoss曾经拥有应该适合您的堆栈的JBoss Portal In fact, you can find an entire bridge between JBoss Portal and the stack you are using. 实际上,您可以在JBoss Portal和您使用的堆栈之间找到一条完整的桥梁 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. 如果您决定需要门户并希望使用其他应用程序,那么我过去已经在JBoss上成功运行过Liferay

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. 同时,通过使用iframe或div和JavaScript和后端编码,您可以获得外观行为类似于Portlet的东西。 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. 通过对伪Portlet进行操作的更多细节,社区可以更具体地帮助您确定在现有代码中连接自己的较小框架还是尝试使用某种较大的Portlet容器似乎更合理。 If you want to reproduce all of the Portlet 1 or 2 spec, I'd go with the container. 如果您想复制所有Portlet 1或2规格,我将使用该容器。 If you want to reproduce a mini-iGoogle, you can probably do someting with JS and HTML. 如果您想复制mini-iGoogle,则可以使用JS和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. 编辑 :查看具有相同portlet标记的其他问题,我发现jQuery UI Sortable-Portlet演示程序可能仅提供您要查找的类似于portlet的功能,而没有整个Portal框架。 It does, of course, pull in jQuery UI. 当然,它确实引入了jQuery UI。

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. 坦白说,如果您不打算对Portlet进行“全面研究”,或者您希望嵌入的Portlet特别复杂,那么我认为切换到Portlet容器没有太大价值。

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). 由于JSF是一个组件框架,所以“ portlet”和“ JSF组件”之间的区别实际上比实际的技术上更具意识形态的(是的,开发模型是不同的,但差别不大)。 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. 您可能最好创建一个新的高级JSF组件作为您的Portlet,而不是为单个服务将Portlet容器的整体重量和复杂性引入应用程序中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我可以在sharepoint 2007中添加Java portlet吗? - Can I add Java portlet in sharepoint 2007? Web应用程序的“类似于Portlet”的Java技术 - A “Portlet-Like” java technolgy for a Web app 是否存在具有用户身份验证的现有基本Java Web应用程序,我可以将其用作模板以快速入门? - is there an existing basic Java web app with user authentication that I can use as a template to get started fast? Portlet Java类实例与Liferay Portlet Web“实例”是否按1:1关联? - Do portlet Java class instances relate as 1:1 with Liferay portlet web “instances”? 如何在现有的Java Web项目中添加AngularJS 2 - How to add AngularJS 2 in existing Java Web project 将vaadin ui添加到现有的Java Web应用程序中 - adding vaadin ui to existing java web app 如何在Java中将方法添加到现有对象? - How can I add method to an existing object in Java? 如何在反应式Java中将新对象添加到现有流中? - How can I add in reactive Java a new Object to an existing stream? 我可以在Java 1.4 Web应用程序中在客户端安装字体吗? - Can I install a font on the client side in a Java 1.4 web app? 如何将Java Web应用程序部署到heroku? - How can I deploy a java web app to heroku?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM