简体   繁体   English

在不编写Portlet的情况下支持JSR 286

[英]Support JSR 286 without writing a portlet

We've been given a requirement that our new project be JSR 286 compliant so that it can eventually be hosted in SharePoint. 我们已经要求我们的新项目符合JSR 286,以便最终可以将其托管在SharePoint中。 But in the same breath we were told that we're not being asked to write a portlet. 但是,与此同时,我们被告知没有被要求编写portlet。 Just be compliant with the standard. 只需符合标准即可。 We were originally thinking of using Struts 2 and just writing a normal application. 我们最初考虑使用Struts 2,而只是编写一个普通的应用程序。

Does this make sense to anyone? 这对任何人有意义吗? I'm going to start digging through the standard but the stuff I have read so far makes it seem like this isn't just a "do this.. don't do this.. name things this way" kind of deal. 我将开始研究标准,但是到目前为止,我所读到的东西似乎不仅仅意味着“这样做。不要这样做。以这种方式命名”。 You either write a portlet or you don't. 您要么写一个portlet,要么不写。 Am I wrong? 我错了吗? Does anyone know of any articles that would point in either direction? 有谁知道指向任何方向的文章?

JSR 286 is the specification for Java portlet 2.0 applications. JSR 286是Java Portlet 2.0应用程序的规范。 The only standard way I know of to consume Java portlets in SharePoint is via WSRP, but that is a separate spec to JSR 286. If you were going to provide your own WSRP implementation, I don't know why you would want to make the application JSR 286 compliant. 我知道在SharePoint中使用Java Portlet的唯一标准方法是通过WSRP,但这是JSR 286的独立规范。如果要提供自己的WSRP实现,我不知道为什么要制作符合JSR 286的应用程序。

I wonder if they mean that you should use a pre-built portlet. 我想知道它们是否意味着您应该使用预先构建的portlet。 For example, if you were using a JSF-based portlet application, you would generally not create your own portlet, but rely on a pre-built implementation to act as a controller and abstract away some of the implementation-specific things (though you still have to write your views for a portlet - not including header markup and so on). 例如,如果您使用的是基于JSF的portlet应用程序,则通常不会创建自己的portlet,而是依靠预先构建的实现来充当控制器并抽象一些实现特定的东西(尽管您仍然必须为portlet编写视图-不包括标头标记等)。

I would ask for a clarification of the requirements. 我要求澄清这些要求。

If you use JSF cleanly you are isolated from the question of whether you are running in a servlet environment or a portlet environment. 如果您干净利落地使用JSF,则可以避免在servlet环境或portlet环境中运行。 Just as long as you don't do eg ServletContext sctx = (ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext(), that kind of thing. 只要您不这样做,例如ServletContext sctx =(ServletContext)FacesContext.getCurrentInstance()。getExternalContext()。getContext(),就可以。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM