期望Java Portal Server托管“标准”Java WebApps是否有效?

时间:2022-12-07 03:40:00

It's been suggested that this might be a reasonable approach, in order to minimize changes to an existing server configurations, but is it actually valid/supported? I've not been able to find anything specific either way.

有人建议这可能是一种合理的方法,以尽量减少对现有服务器配置的更改,但实际上是否有效/支持?我无法找到任何具体的方法。

In practice, with a JBoss Portal V2.4.2 server, there appears to be some class-loading issues, so things such as the downloadable Stripes example or a standard Wicket quickstart app don't run, but I'm not sure if the problem there is a server-specific one or a generic one - Anyone?

在实践中,使用JBoss Portal V2.4.2服务器,似乎存在一些类加载问题,因此诸如可下载的Stripes示例或标准Wicket快速入门应用程序之类的东西不能运行,但我不确定是否存在问题有一个特定于服务器的或一个通用的 - 任何人?

Note: This isn't about displaying/moving an existing web-app into a portal, simply if a Portal Server should also be a valid AppServer?

注意:这不是关于将现有Web应用程序显示/移动到门户中,只是Portal Server也应该是有效的AppServer?

6 个解决方案

#1


2  

JSR 286 (Portlet 2.0) spec:

JSR 286(Portlet 2.0)规范:

PLT.2.7

Relationship with Java 2 Platform, Standard and Enterprise Edition

与Java 2平台,标准版和企业版的关系

The Portlet API v2.0 is based on the Java Platform, Standard Edition 5.0 and Enterprise Edition v1.4. Portlet containers should at least meet the requirements, described in v 1.4 of the J2EE Specification, for executing in a J2EE environment.

Portlet API v2.0基于Java平台,标准版5.0和企业版v1.4。 Portlet容器至少应满足J2EE规范v 1.4中描述的要求,以便在J2EE环境中执行。

It is therefore not unreasonable to expect standard app-server applications to work under a portal.

因此,期望标准的应用服务器应用程序在门户下工作并不是不合理的。

However, by definition, a portal is going to include more libraries in the global class space. Adding libraries to the container always introduces the risk of incompatibility and the need to manage what classes/resources are exposed to your application and how (application-first class-loading, etcetera). I've had problems in the past with third part libraries whose dependencies conflicted with a version that shipped with the portal. I wouldn't expect dependency management to get any easier.

但是,根据定义,门户网站将在全局类空间中包含更多库。向容器添加库总是会带来不兼容的风险,并且需要管理应用程序所暴露的类/资源以及如何(应用程序优先加载等)。我在过去遇到过第三部分库的问题,这些库的依赖性与门户网站附带的版本冲突。我不希望依赖管理变得更容易。

Write once, test everywhere, as they say.

写一次,到处测试,正如他们所说。

#2


0  

From my experience that is a valid suggestion. Portlet Apps are often also Webapps (they might contain a servlet for example to allow access to application logic also by links to be rendered in one of the portlets), so they contain both portlet.xml and web.xml and need j2ee classes and jsr168 classes. The WSRP standard also contains resource link type with is supposed to represent a normal appserver for the remote server.

根据我的经验,这是一个有效的建议。 Portlet应用程序通常也是Web应用程序(它们可能包含一个servlet,例如,允许通过链接在一个portlet中呈现来访问应用程序逻辑),因此它们包含portlet.xml和web.xml,需要j2ee类和jsr168类。 WSRP标准还包含资源链接类型,应该代表远程服务器的普通应用服务器。

Websphere portal server is also an app server.

Websphere门户服务器也是一个应用服务器。

#3


0  

I have mixed servlets and portlets in a single web application using JBoss Portal, BEA WebLogic Portal and Apache Jetspeed 2.

我使用JBoss Portal,BEA WebLogic Portal和Apache Jetspeed 2在一个Web应用程序中混合了servlet和portlet。

However, converting a servlet to a portlet can be difficult. Using bridging technology such as Portals Bridges do exist but I have been lucky enough to avoid having to do such a conversion and have no direct experience other than playing with the tutorials.

但是,将servlet转换为portlet可能很困难。使用诸如Portals Bridges之类的桥接技术确实存在,但我很幸运,避免不得不进行这样的转换,除了玩教程之外没有直接的经验。

#4


0  

Hmm... but can it /exclusively/ contain servlets, or in other words, does an app need to have at least 1 portlet? (I don't have/want to serve a portlet, just a servlet, but I've only got a Portal Server!)

嗯......但是它/可以/包含servlet,或者换句话说,应用程序是否需要至少有一个portlet? (我没有/想要提供一个portlet,只是一个servlet,但我只有一个Portal Server!)

Even if the application contains a portlet, nothing says you need to expose that portlet on a page somewhere. If you write such an application, simply author as many servlets as you wish, link to them directly and not place any dummy/default portlet on any page anywhere.

即使应用程序包含portlet,也没有任何内容表明您需要在某个页面上公开该portlet。如果您编写这样的应用程序,只需编写任意数量的servlet,直接链接到它们,而不是在任何页面上放置任何虚拟/默认portlet。

I wrote a JSR-168 compliant app with an empty portlet and a servlet that was used to retrieve some XML stock price data. For several months all that was ever invoked was the servlet, the portlet was never visible anywhere on the site. Later I added a portlet which provided some additional data from the XML feed.

我写了一个JSR-168兼容的应用程序,它有一个空的portlet和一个servlet,用于检索一些XML股票价格数据。几个月以来,所有被调用的都是servlet,portlet在网站的任何地方都不可见。后来我添加了一个portlet,它从XML feed中提供了一些额外的数据。

#5


0  

The answer is that yes, it is valid, but the specific JBoss Portal V2.4.* versions appear to have class-loader issues such that only the more basic web-apps will run correctly.

答案是,是的,它是有效的,但具体的JBoss Portal V2.4。*版本似乎有类加载器问题,只有更基本的Web应用程序才能正确运行。

#6


0  

I assume that the question has to do whether a standard web application can be rendered as a portlet from a Portlet container. This is not possible. The portlets need to be based on the GenericPortlet class and have special deployment descriptors. There is the JSR-168 standard, which specifies the requirements for the portal. The JSR-286 specification is on the way.

我假设问题是,标准Web应用程序是否可以从Portlet容器呈现为portlet。这是不可能的。 portlet需要基于GenericPortlet类并具有特殊的部署描述符。有JSR-168标准,它规定了门户的要求。 JSR-286规范即将推出。

The only thing you could do is to create a portlet that will serve your existing application through an iframe, but this is of course ugly.

你唯一能做的就是创建一个通过iframe服务你现有应用程序的portlet,但这当然很难看。

There is a free book for portlets called "Portlets and Apache Portals", which could be useful. Consult also the specification. This blog spot is interesting.

有一本名为“Portlets和Apache Portals”的portlet免费书,它可能很有用。另请参阅规范。这个博客点很有意思。

#1


2  

JSR 286 (Portlet 2.0) spec:

JSR 286(Portlet 2.0)规范:

PLT.2.7

Relationship with Java 2 Platform, Standard and Enterprise Edition

与Java 2平台,标准版和企业版的关系

The Portlet API v2.0 is based on the Java Platform, Standard Edition 5.0 and Enterprise Edition v1.4. Portlet containers should at least meet the requirements, described in v 1.4 of the J2EE Specification, for executing in a J2EE environment.

Portlet API v2.0基于Java平台,标准版5.0和企业版v1.4。 Portlet容器至少应满足J2EE规范v 1.4中描述的要求,以便在J2EE环境中执行。

It is therefore not unreasonable to expect standard app-server applications to work under a portal.

因此,期望标准的应用服务器应用程序在门户下工作并不是不合理的。

However, by definition, a portal is going to include more libraries in the global class space. Adding libraries to the container always introduces the risk of incompatibility and the need to manage what classes/resources are exposed to your application and how (application-first class-loading, etcetera). I've had problems in the past with third part libraries whose dependencies conflicted with a version that shipped with the portal. I wouldn't expect dependency management to get any easier.

但是,根据定义,门户网站将在全局类空间中包含更多库。向容器添加库总是会带来不兼容的风险,并且需要管理应用程序所暴露的类/资源以及如何(应用程序优先加载等)。我在过去遇到过第三部分库的问题,这些库的依赖性与门户网站附带的版本冲突。我不希望依赖管理变得更容易。

Write once, test everywhere, as they say.

写一次,到处测试,正如他们所说。

#2


0  

From my experience that is a valid suggestion. Portlet Apps are often also Webapps (they might contain a servlet for example to allow access to application logic also by links to be rendered in one of the portlets), so they contain both portlet.xml and web.xml and need j2ee classes and jsr168 classes. The WSRP standard also contains resource link type with is supposed to represent a normal appserver for the remote server.

根据我的经验,这是一个有效的建议。 Portlet应用程序通常也是Web应用程序(它们可能包含一个servlet,例如,允许通过链接在一个portlet中呈现来访问应用程序逻辑),因此它们包含portlet.xml和web.xml,需要j2ee类和jsr168类。 WSRP标准还包含资源链接类型,应该代表远程服务器的普通应用服务器。

Websphere portal server is also an app server.

Websphere门户服务器也是一个应用服务器。

#3


0  

I have mixed servlets and portlets in a single web application using JBoss Portal, BEA WebLogic Portal and Apache Jetspeed 2.

我使用JBoss Portal,BEA WebLogic Portal和Apache Jetspeed 2在一个Web应用程序中混合了servlet和portlet。

However, converting a servlet to a portlet can be difficult. Using bridging technology such as Portals Bridges do exist but I have been lucky enough to avoid having to do such a conversion and have no direct experience other than playing with the tutorials.

但是,将servlet转换为portlet可能很困难。使用诸如Portals Bridges之类的桥接技术确实存在,但我很幸运,避免不得不进行这样的转换,除了玩教程之外没有直接的经验。

#4


0  

Hmm... but can it /exclusively/ contain servlets, or in other words, does an app need to have at least 1 portlet? (I don't have/want to serve a portlet, just a servlet, but I've only got a Portal Server!)

嗯......但是它/可以/包含servlet,或者换句话说,应用程序是否需要至少有一个portlet? (我没有/想要提供一个portlet,只是一个servlet,但我只有一个Portal Server!)

Even if the application contains a portlet, nothing says you need to expose that portlet on a page somewhere. If you write such an application, simply author as many servlets as you wish, link to them directly and not place any dummy/default portlet on any page anywhere.

即使应用程序包含portlet,也没有任何内容表明您需要在某个页面上公开该portlet。如果您编写这样的应用程序,只需编写任意数量的servlet,直接链接到它们,而不是在任何页面上放置任何虚拟/默认portlet。

I wrote a JSR-168 compliant app with an empty portlet and a servlet that was used to retrieve some XML stock price data. For several months all that was ever invoked was the servlet, the portlet was never visible anywhere on the site. Later I added a portlet which provided some additional data from the XML feed.

我写了一个JSR-168兼容的应用程序,它有一个空的portlet和一个servlet,用于检索一些XML股票价格数据。几个月以来,所有被调用的都是servlet,portlet在网站的任何地方都不可见。后来我添加了一个portlet,它从XML feed中提供了一些额外的数据。

#5


0  

The answer is that yes, it is valid, but the specific JBoss Portal V2.4.* versions appear to have class-loader issues such that only the more basic web-apps will run correctly.

答案是,是的,它是有效的,但具体的JBoss Portal V2.4。*版本似乎有类加载器问题,只有更基本的Web应用程序才能正确运行。

#6


0  

I assume that the question has to do whether a standard web application can be rendered as a portlet from a Portlet container. This is not possible. The portlets need to be based on the GenericPortlet class and have special deployment descriptors. There is the JSR-168 standard, which specifies the requirements for the portal. The JSR-286 specification is on the way.

我假设问题是,标准Web应用程序是否可以从Portlet容器呈现为portlet。这是不可能的。 portlet需要基于GenericPortlet类并具有特殊的部署描述符。有JSR-168标准,它规定了门户的要求。 JSR-286规范即将推出。

The only thing you could do is to create a portlet that will serve your existing application through an iframe, but this is of course ugly.

你唯一能做的就是创建一个通过iframe服务你现有应用程序的portlet,但这当然很难看。

There is a free book for portlets called "Portlets and Apache Portals", which could be useful. Consult also the specification. This blog spot is interesting.

有一本名为“Portlets和Apache Portals”的portlet免费书,它可能很有用。另请参阅规范。这个博客点很有意思。