Liferay6:Jsr168Dispatcher Struts2 类

发布于 2024-12-23 09:13:05 字数 648 浏览 1 评论 0原文

我正在使用 Liferay 6 和 Struts 2 ,并假设这是 Liferay 6 是根据 JSR 268 投诉

org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher

我已经在网上看到了 Liferay6 和 Struts2 的示例,其中 portlet 。 xml 由这个组成。

<portlet>
    <portlet-name>TestPortlet</portlet-name>
    <display-name>TestPortlet</display-name>
    <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
</portlet>

这个例子工作正常,但我仍然想知道我们是否会错过任何功能?

请告诉我这个 portlet.xml 是否有效,因为它指定了 Struts 类的 jsr 168 版本?

或者我们应该使用 jsr 268 struts2 Portlet 类?

I am using Liferay 6 and Struts 2 , and assume that this is Liferay 6 is according to JSR 268 complaint

org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher

I have seen a example of Liferay6 and Struts2 on to net in which the portlet.xml consists of this .

<portlet>
    <portlet-name>TestPortlet</portlet-name>
    <display-name>TestPortlet</display-name>
    <portlet-class>org.apache.struts2.portlet.dispatcher.Jsr168Dispatcher</portlet-class>
</portlet>

This example works fine , but still i want to know if we would misss any of the features ??

PLease tell me if this portlet.xml is valid as it specificies jsr 168 version of Struts classs ??

Or should we use jsr 268 struts2 Portlet class ??

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

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

发布评论

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

评论(1

拔了角的鹿 2024-12-30 09:13:05

使用org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher:

http://struts.apache.org/2.3.1/struts2-plugins/struts2-portlet-plugin/apidocs/org/apache/struts2/portlet/dispatcher/Jsr286Dispatcher.html

使用 Portlet 2 (JSR286) 特定功能扩展 Jsr168Dispatcher - 资源服务、事件处理等。

不过,如果您不需要这些功能,您可以可以坚持使用 Jsr168Dispatcher - 您的 web.xml 将保持有效。只是您会错过我们的 JSR286 功能。

Use org.apache.struts2.portlet.dispatcher.Jsr286Dispatcher:

http://struts.apache.org/2.3.1/struts2-plugins/struts2-portlet-plugin/apidocs/org/apache/struts2/portlet/dispatcher/Jsr286Dispatcher.html

It extends Jsr168Dispatcher with Portlet 2 (JSR286) specific features - resources serving, events handling etc.

Though if you don't need those you could stick with Jsr168Dispatcher - your web.xml would remain valid. It's just you would miss our JSR286 features.

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