开发者

Support JSR 286 without writing a portlet

开发者 https://www.devze.com 2023-01-19 13:45 出处:网络
We\'ve been given a requirement that our new project be JSR 286 compliant so that it can eventually be hosted in SharePoint.But in the same breath we were told that we\'re not being asked to write a p

We've been given a requirement that our new project be JSR 286 compliant so that it can eventually be hosted in SharePoint. But in the same breath we were told that we're not being asked to write a portlet. Just be compliant with the standard. We开发者_运维问答 were originally thinking of using Struts 2 and just writing a normal application.

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. 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. 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.

I wonder if they mean that you should use a pre-built 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).

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. Just as long as you don't do e.g. ServletContext sctx = (ServletContext)FacesContext.getCurrentInstance().getExternalContext().getContext(), that kind of thing.

0

精彩评论

暂无评论...
验证码 换一张
取 消