Liferay6:Jsr168Dispatcher Struts2 类
我正在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用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.