|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
How about allowing empty namespaced portlet descriptor?Hi there,
During testing portlet deployments with some useful PAs from jp.sf.pal portlet repository, I found that the current pluto-2 deployment component failed to deploy a PA when the descriptor of the PA does not have any namespace uri definition with the following exceptions: java.io.IOException: unexpected element (uri:"", local:"portlet-app"). Expected elements are <{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-app>,<{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-app> The portlet.xml is like the following: <?xml version="1.0" encoding="UTF-8"?> <portlet-app id="charttest" version="1.0"> <snip/> </portlet-app> It's simply because PortletAppDescriptorServiceImpl is using explicit schema based JAXB unmarshalling. (.../portlet-app_1_0.xsd or .../portlet-app_2_0.xsd) However, if we allow empty namespaced descriptor as well, then I think it would be very helpful to deploy some old portlet-1.0 based existing portlet applications. To do this without any side effect, we can just copy the portlet 1.0 JAXB package, "o.a.p.container.om.portlet10.impl", to a new package (such as "o.a.p.container.om.portlet10.emptyns.impl"?), with empty namespace annotations and add it into the JAXB context as a third option in the PortletAppDescriptorService implementation. By the way, this feature has been recently committed in Jetspeed-2.2.1-SNAPSHOT, but I'm now thinking it would be better to move this to pluto. You can see the issue (JS2-1061) and the related discussion here: http://www.nabble.com/On-the-current-strong-validation-during-PA-deployment-td25261119.html If there's no objection, I hope to add this to pluto trunk. What do you think? Kind regards, Woonsan |
|
|
Re: How about allowing empty namespaced portlet descriptor?Now, while I think that a portlet.xml which does not use use the
namespace is not valid (wrt the spec), it sounds reasonable to support such descriptors. And I also agree that this support makes sense in Pluto. The only question I have which cases we support :) The example below mentions: <portlet-app id="charttest" version="1.0">. This can be supported easily. Two questions: - I guess the version attribute is still mandatory, right? - What happens if someone is using <portlet-app id="charttest" version="2.0">? Would we support that as well? Regards Carsten Woonsan Ko wrote: > Hi there, > > During testing portlet deployments with some useful PAs from jp.sf.pal portlet repository, I found that the current pluto-2 deployment component failed to deploy a PA when the descriptor of the PA does not have any namespace uri definition with the following exceptions: > > java.io.IOException: unexpected element > (uri:"", local:"portlet-app"). Expected elements are > <{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-app>,<{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-app> > > The portlet.xml is like the following: > > <?xml version="1.0" encoding="UTF-8"?> > <portlet-app id="charttest" version="1.0"> > <snip/> > </portlet-app> > > It's simply because PortletAppDescriptorServiceImpl is using explicit schema based JAXB unmarshalling. (.../portlet-app_1_0.xsd or .../portlet-app_2_0.xsd) > > However, if we allow empty namespaced descriptor as well, then I think it would be very helpful to deploy some old portlet-1.0 based existing portlet applications. > > To do this without any side effect, we can just copy the portlet 1.0 JAXB package, "o.a.p.container.om.portlet10.impl", to a new package (such as "o.a.p.container.om.portlet10.emptyns.impl"?), with empty namespace annotations and add it into the JAXB context as a third option in the PortletAppDescriptorService implementation. > > By the way, this feature has been recently committed in Jetspeed-2.2.1-SNAPSHOT, but I'm now thinking it would be better to move this to pluto. > You can see the issue (JS2-1061) and the related discussion here: > http://www.nabble.com/On-the-current-strong-validation-during-PA-deployment-td25261119.html > > If there's no objection, I hope to add this to pluto trunk. > What do you think? > > > Kind regards, > > Woonsan > > > > > -- Carsten Ziegeler cziegeler@... |
|
|
Re: How about allowing empty namespaced portlet descriptor?Hi Carsten,
--- On Thu, 9/10/09, Carsten Ziegeler <cziegeler@...> wrote: > From: Carsten Ziegeler <cziegeler@...> > Subject: Re: How about allowing empty namespaced portlet descriptor? > To: pluto-dev@... > Date: Thursday, September 10, 2009, 5:39 PM > Now, while I think that a portlet.xml > which does not use use the > namespace is not valid (wrt the spec), it sounds reasonable > to > support such descriptors. > And I also agree that this support makes sense in Pluto. > > The only question I have which cases we support :) > The example below mentions: <portlet-app id="charttest" > version="1.0">. > This can be supported easily. > Two questions: > - I guess the version attribute is still mandatory, right? Right. I've just found that the xsd says it is a required attribute. > - What happens if someone is using <portlet-app > id="charttest" > version="2.0">? Would we support that as well? Good point. I haven't thought of it. :-) I found the following in the section, "PLT.25.4 Rules for processing the Portlet Deployment Descriptor", of the spec: "It is recommended, but not required, that portlet containers and tools validate both deployment descriptors against the corresponding DTD and XML Schema definitions for structural correctness." So, I'm inclined to support that case as well because it is mentioned as *not required*. Regards, Woonsan > > Regards > Carsten > > Woonsan Ko wrote: > > Hi there, > > > > During testing portlet deployments with some useful > PAs from jp.sf.pal portlet repository, I found that the > current pluto-2 deployment component failed to deploy a PA > when the descriptor of the PA does not have any namespace > uri definition with the following exceptions: > > > > java.io.IOException: unexpected element > > (uri:"", local:"portlet-app"). Expected elements are > > <{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-app>,<{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-app> > > > > The portlet.xml is like the following: > > > > <?xml version="1.0" encoding="UTF-8"?> > > <portlet-app id="charttest" version="1.0"> > > <snip/> > > </portlet-app> > > > > It's simply because PortletAppDescriptorServiceImpl is > using explicit schema based JAXB unmarshalling. > (.../portlet-app_1_0.xsd or .../portlet-app_2_0.xsd) > > > > However, if we allow empty namespaced descriptor as > well, then I think it would be very helpful to deploy some > old portlet-1.0 based existing portlet applications. > > > > To do this without any side effect, we can just copy > the portlet 1.0 JAXB package, > "o.a.p.container.om.portlet10.impl", to a new package (such > as "o.a.p.container.om.portlet10.emptyns.impl"?), with > empty namespace annotations and add it into the JAXB context > as a third option in the PortletAppDescriptorService > implementation. > > > > By the way, this feature has been recently committed > in Jetspeed-2.2.1-SNAPSHOT, but I'm now thinking it would be > better to move this to pluto. > > You can see the issue (JS2-1061) and the related > discussion here: > > http://www.nabble.com/On-the-current-strong-validation-during-PA-deployment-td25261119.html > > > > If there's no objection, I hope to add this to pluto > trunk. > > What do you think? > > > > > > Kind regards, > > > > Woonsan > > > > > > > > > > > > > -- > Carsten Ziegeler > cziegeler@... > |
|
|
Re: How about allowing empty namespaced portlet descriptor?Woonsan Ko wrote:
> Hi Carsten, > > > --- On Thu, 9/10/09, Carsten Ziegeler <cziegeler@...> wrote: > >> From: Carsten Ziegeler <cziegeler@...> >> Subject: Re: How about allowing empty namespaced portlet descriptor? >> To: pluto-dev@... >> Date: Thursday, September 10, 2009, 5:39 PM >> Now, while I think that a portlet.xml >> which does not use use the >> namespace is not valid (wrt the spec), it sounds reasonable >> to >> support such descriptors. >> And I also agree that this support makes sense in Pluto. >> >> The only question I have which cases we support :) >> The example below mentions: <portlet-app id="charttest" >> version="1.0">. >> This can be supported easily. >> Two questions: >> - I guess the version attribute is still mandatory, right? > > Right. I've just found that the xsd says it is a required attribute. > >> - What happens if someone is using <portlet-app >> id="charttest" >> version="2.0">? Would we support that as well? > > Good point. I haven't thought of it. :-) > I found the following in the section, "PLT.25.4 Rules for processing the Portlet Deployment Descriptor", of the spec: > > "It is recommended, but not required, that portlet containers and tools validate both deployment descriptors against the corresponding DTD and XML Schema definitions for structural correctness." > > So, I'm inclined to support that case as well because it is mentioned as *not required*. Regards, Ate > > > Regards, > > Woonsan > > >> Regards >> Carsten >> >> Woonsan Ko wrote: >>> Hi there, >>> >>> During testing portlet deployments with some useful >> PAs from jp.sf.pal portlet repository, I found that the >> current pluto-2 deployment component failed to deploy a PA >> when the descriptor of the PA does not have any namespace >> uri definition with the following exceptions: >>> java.io.IOException: unexpected element >>> (uri:"", local:"portlet-app"). Expected elements are >>> <{http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd}portlet-app>,<{http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd}portlet-app> >>> >>> The portlet.xml is like the following: >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <portlet-app id="charttest" version="1.0"> >>> <snip/> >>> </portlet-app> >>> >>> It's simply because PortletAppDescriptorServiceImpl is >> using explicit schema based JAXB unmarshalling. >> (.../portlet-app_1_0.xsd or .../portlet-app_2_0.xsd) >>> However, if we allow empty namespaced descriptor as >> well, then I think it would be very helpful to deploy some >> old portlet-1.0 based existing portlet applications. >>> To do this without any side effect, we can just copy >> the portlet 1.0 JAXB package, >> "o.a.p.container.om.portlet10.impl", to a new package (such >> as "o.a.p.container.om.portlet10.emptyns.impl"?), with >> empty namespace annotations and add it into the JAXB context >> as a third option in the PortletAppDescriptorService >> implementation. >>> By the way, this feature has been recently committed >> in Jetspeed-2.2.1-SNAPSHOT, but I'm now thinking it would be >> better to move this to pluto. >>> You can see the issue (JS2-1061) and the related >> discussion here: >>> http://www.nabble.com/On-the-current-strong-validation-during-PA-deployment-td25261119.html >>> >>> If there's no objection, I hope to add this to pluto >> trunk. >>> What do you think? >>> >>> >>> Kind regards, >>> >>> Woonsan >>> >>> >>> >>> >>> >> >> -- >> Carsten Ziegeler >> cziegeler@... >> > > > |
|
|
Re: How about allowing empty namespaced portlet descriptor?Woonsan Ko wrote:
> > So, I'm inclined to support that case as well because it is mentioned as *not required*. > Great, so +1 to the whole thing. Regards Carsten -- Carsten Ziegeler cziegeler@... |
| Free embeddable forum powered by Nabble | Forum Help |