views:

38

answers:

2

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?

+1  A: 

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.

McDowell
We did and I mentioned WSRP. They seem to think SharePoint will support JSR 286 and are asking that we just make sure we follow it. But you can't really do that without writing a portlet in the first place right?
ShaneC
I may not know much about SharePoint, but I think I'd be on safe ground in saying it's not going to run JEE applications. JSR 286 without portlets seems like a contradiction in terms. The JSR 286 document starts _This document is the Java Portlet Specification, v2.0. The standard for the Java Portlet API is described here._
McDowell
A: 

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.

EJP