You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-user@portals.apache.org by Rob Bradley <ro...@visionsolutions.com> on 2009/07/09 12:35:01 UTC

selector.conditional.role not working?

I am in the process of trying to stop a number of j2-admin portlets
displaying in the Category Selector Portlet. I don't want them to appear to
anybody including admin users.

I found a document on the website which indicates what I want to do is
possible:
http://portals.apache.org/jetspeed-2.1.3/deployguide/guide-registry.html

It refers to setting the js:metadata selector.conditional.role to * in order
to never show a portlet, however this does not appear to be working. I am
using Jetspeed 2.1.3 and the file I'm changing is jetspeed-portlet.xml in
the WEB-INF of the j2-admin webapp.

For example:

<portlet>
  <portlet-name>WelcomeToJetspeed</portlet-name>
  <js:security-constraint-ref>public-view</js:security-constraint-ref>
  <js:metadata name="selector.conditional.role">*</js:metadata>
</portlet>

Please can anybody advise on what I'm doing wrong?

Many thanks,
Rob
-- 
View this message in context: http://www.nabble.com/selector.conditional.role-not-working--tp24407834p24407834.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Jetspeed archetype problem with Eclipse 3.4

Posted by harinath <ha...@gmail.com>.
Dear all,

I think I found an issue with eclipse maven archetype of jetspeed
especially if used from Eclipse 3.4 UI. For me eclipse lists out
possible archetypes and jetspeed 2.2.0 is one among them. 

In case if I am wrong somewhere in using eclipse/jetspeed archetype,
please do let me know.

Issue 1:
Please see the attached screenshot. It folder names are not properly
resolved.


Issue 2:
Portal application web.xml doesn't contain anything. Certainly this is
not the case with commandline jetspeed project creation using mvn.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
  <display-name>CMSPortal-portal</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>


Thanks
harinath



Jetspeed archetype problem with Eclipse 3.4

Posted by harinath <ha...@gmail.com>.
Dear all,

I think I found an issue with eclipse maven archetype of jetspeed
especially if used from Eclipse 3.4 UI. For me eclipse lists out
possible archetypes and jetspeed 2.2.0 is one among them. 

In case if I am wrong somewhere in using eclipse/jetspeed archetype,
please do let me know.

Issue 1:
Please see the attached screenshot. It folder names are not properly
resolved.


Issue 2:
Portal application web.xml doesn't contain anything. Certainly this is
not the case with commandline jetspeed project creation using mvn.

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
version="2.5">
  <display-name>CMSPortal-portal</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    <welcome-file>index.htm</welcome-file>
    <welcome-file>index.jsp</welcome-file>
    <welcome-file>default.html</welcome-file>
    <welcome-file>default.htm</welcome-file>
    <welcome-file>default.jsp</welcome-file>
  </welcome-file-list>
</web-app>


Thanks
harinath



Re: Servlet URL generation in 2.2

Posted by Ron McNulty <rm...@xtra.co.nz>.
Hi All

Looks like there is a work-around. Explicitly defining the context works in 
both Jetspeed 2.1.3 and 2.2.0.

<c:url context="/frc" value="/print/ptsconfirm/receipt.pdf" />

Off to test it on WPS...

Regards

Ron

----- Original Message ----- 
From: "Ron McNulty" <rm...@xtra.co.nz>
To: "Jetspeed Users List" <je...@portals.apache.org>
Sent: Sunday, July 12, 2009 12:31 PM
Subject: Servlet URL generation in 2.2


> Hi All
>
> I have written a servlet (to generate and print PDFs) in my Jetspeed 
> application, which is deployed as frc.war. The code needs to run both on 
> Jetspeed 2.2.0 and IBM Websphere Portal Server (WPS).
>
> A typical call to the servlet is 
> http://localhost:8080/frc/print/ptsconfirm/receipt.pdf  This is the URL 
> that works in both Jetspeed 2.1.3 and 2.2.0
>
> In my JSP, the url is generated from the following code:
>
> <c:url value="/print/ptsconfirm/receipt.pdf" />
>
> In Jetspeed 2.1.3 and WPS this creates the URL 
> http://localhost:8080/frc/print/ptsconfirm/receipt.pdf as expected.
>
> But in Jetspeed 2.2.0 the same JSP code creates the URL 
> http://localhost:8080/jetspeed/print/ptsconfirm/receipt.pdf which does not 
> work.
>
> I realise that JSR 286 provides easier ways to generate PDFs, but for now 
> we are deploying on WPS v6.0, which supports only JSR 168.
>
> Is this a change between JSR 168 and JSR 286, a bug, or something I should 
> be doing differently?
>
> Regards
>
> Ron
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-user-help@portals.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Servlet URL generation in 2.2

Posted by Ron McNulty <rm...@xtra.co.nz>.
Hi All

I have written a servlet (to generate and print PDFs) in my Jetspeed 
application, which is deployed as frc.war. The code needs to run both on 
Jetspeed 2.2.0 and IBM Websphere Portal Server (WPS).

A typical call to the servlet is 
http://localhost:8080/frc/print/ptsconfirm/receipt.pdf  This is the URL that 
works in both Jetspeed 2.1.3 and 2.2.0

In my JSP, the url is generated from the following code:

 <c:url value="/print/ptsconfirm/receipt.pdf" />

In Jetspeed 2.1.3 and WPS this creates the URL 
http://localhost:8080/frc/print/ptsconfirm/receipt.pdf as expected.

But in Jetspeed 2.2.0 the same JSP code creates the URL 
http://localhost:8080/jetspeed/print/ptsconfirm/receipt.pdf which does not 
work.

I realise that JSR 286 provides easier ways to generate PDFs, but for now we 
are deploying on WPS v6.0, which supports only JSR 168.

Is this a change between JSR 168 and JSR 286, a bug, or something I should 
be doing differently?

Regards

Ron


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: selector.conditional.role not working?

Posted by Rob Bradley <ro...@visionsolutions.com>.

Frank Otto-5 wrote:
> 
> In my custom portal, I have commented out all other admin portlets and 
> it works. There are no dependencies.
> 
Thanks again Frank that is working perfectly. I guess I should have known
the Jetspeed would have less spaghetti.
-- 
View this message in context: http://www.nabble.com/selector.conditional.role-not-working--tp24407834p24410174.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: selector.conditional.role not working?

Posted by Frank Otto <ot...@delta-barth.de>.
In my custom portal, I have commented out all other admin portlets and 
it works. There are no dependencies.

Rob Bradley schrieb:
> 
> Frank Otto-5 wrote:
>> you can comment out the not wanted admin portlets in portlet.xml of 
>> j2-admin.
>> Thanks Frank. I had thought of this but I have concerns about whether some
>> of the portlets actually have inter-related code reliant upon another
>> portlet being available.
> 
> I was using Liferay prior to moving over to Jetspeed and if you messed
> around with portlet.xml in Liferay you could blow the whole administrative
> system out pretty easily (it turns out that almost every portlet they ship
> is inter-linked in some way).
> 
> If you're saying that isn't the case with Jetspeed then I'll give it a try.
> Thanks for your help.



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: selector.conditional.role not working?

Posted by Rob Bradley <ro...@visionsolutions.com>.

Frank Otto-5 wrote:
> 
> you can comment out the not wanted admin portlets in portlet.xml of 
> j2-admin.
> Thanks Frank. I had thought of this but I have concerns about whether some
> of the portlets actually have inter-related code reliant upon another
> portlet being available.

I was using Liferay prior to moving over to Jetspeed and if you messed
around with portlet.xml in Liferay you could blow the whole administrative
system out pretty easily (it turns out that almost every portlet they ship
is inter-linked in some way).

If you're saying that isn't the case with Jetspeed then I'll give it a try.
Thanks for your help.
-- 
View this message in context: http://www.nabble.com/selector.conditional.role-not-working--tp24407834p24408979.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: selector.conditional.role not working?

Posted by Frank Otto <ot...@delta-barth.de>.
Hi,

you can comment out the not wanted admin portlets in portlet.xml of 
j2-admin.


kind regards,

Frank

Rob Bradley schrieb:
> 
> Woonsan Ko wrote:
>> I think the feature was introduced with 2.2.0 release.
>> Please see JS2-853 in the following page:
>>
>> http://portals.apache.org/jetspeed-2/release-notes.html
>>
>> It seems that the patch was backported to JETSPEED-2.1.3-POSTRELEASE
>> branch. It think that's why you found it in the 2.1.3 documentation.
>>
> Thanks for the quick reply Woonsan. That is a real shame as I can't
> currently upgrade to the 2.2.0. I've been trying to remove them for a while
> now since I don't really want any of the j2-admin portlets to appear in the
> selector (only the login portlet and the category selector itself).
> 
> I did find a way to ignore them by editing the code which produces the list
> in "category-portlet-selector.vm", however the problem with that is it still
> counts them as part of the page so for example if you say you want 15
> portlets to a page and 10 of them are j2-admin it will only show 5 portlets
> on that page.
> 
> I'm still looking at ways of doing this in 2.1.3 so any ideas would be
> gratefully accepted.



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org


Re: selector.conditional.role not working?

Posted by Rob Bradley <ro...@visionsolutions.com>.

Woonsan Ko wrote:
> 
> I think the feature was introduced with 2.2.0 release.
> Please see JS2-853 in the following page:
> 
> http://portals.apache.org/jetspeed-2/release-notes.html
> 
> It seems that the patch was backported to JETSPEED-2.1.3-POSTRELEASE
> branch. It think that's why you found it in the 2.1.3 documentation.
> 
Thanks for the quick reply Woonsan. That is a real shame as I can't
currently upgrade to the 2.2.0. I've been trying to remove them for a while
now since I don't really want any of the j2-admin portlets to appear in the
selector (only the login portlet and the category selector itself).

I did find a way to ignore them by editing the code which produces the list
in "category-portlet-selector.vm", however the problem with that is it still
counts them as part of the page so for example if you say you want 15
portlets to a page and 10 of them are j2-admin it will only show 5 portlets
on that page.

I'm still looking at ways of doing this in 2.1.3 so any ideas would be
gratefully accepted.
-- 
View this message in context: http://www.nabble.com/selector.conditional.role-not-working--tp24407834p24408765.html
Sent from the Jetspeed - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-user-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-user-help@portals.apache.org