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 Travis Ward <tr...@yahoo.com> on 2005/09/08 19:45:46 UTC

Removing a Portlet Application - JS1.6 with Fusion

Questions about JSR-168 portlets - running
Jetspeed-1.6 with Fusion.

Question 1: How are you suppose to remove a deployed
portlet application?

First I drop a JSR-168 application like demo.war into
/WEB-INF/deploy and the application is deployed
successfully.

Now I want to remove this deployed JSR-168 application
- what is the proper way of doing this?

The JS2 notes state that I should be able to just
delete the deployed demo.jar and that a listener will
detech the change and undeploy the app - this does not
seem to be the case for JS1.6??

I've also tried deploying the Portlet Application
Lifecycle Manager (PALM), which is the JSR-168
application in JS2 for stoping, starting, undeploying
and deleting applications.  When I undeploy/delete the
application through this portlet the
PersistenceBrokerPortletRegistry is called which
updates the database with the changes, but does not
update the PSML fragments.  The local-portlets.xreg
still contain entries for the deleted portlet
application.

Looks like the FusionPAM class is has methods to take
care of this and it is just not being called?

Question 2: All deployed JSR-168 portlets seem to pick
up the categorization from its parent PSML fragment. 
I am aware that you can use the administrative portlet
to modify these categories after deployment, but is
there any other way to configure what category these
portlets should be deployed with?

Question 3: How best to provide a default security
role to JSR-168 portlets?  I realize that I can use
the adminstrative portlet to update the security role
for each deployed portlet, but is there any other way
to provide a default security role for JSR-168
deployed portlets?

Any help would be greatly appreciated!

Travis


	
		
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/

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


Re: Removing a Portlet Application - JS1.6 with Fusion

Posted by David Sean Taylor <da...@bluesunrise.com>.
Travis Ward wrote:
> Questions about JSR-168 portlets - running
> Jetspeed-1.6 with Fusion.
> 
> Question 1: How are you suppose to remove a deployed
> portlet application?
> 
> First I drop a JSR-168 application like demo.war into
> /WEB-INF/deploy and the application is deployed
> successfully.
> 
> Now I want to remove this deployed JSR-168 application
> - what is the proper way of doing this?
> 
> The JS2 notes state that I should be able to just
> delete the deployed demo.jar and that a listener will
> detech the change and undeploy the app - this does not
> seem to be the case for JS1.6??
> 
> I've also tried deploying the Portlet Application
> Lifecycle Manager (PALM), which is the JSR-168
> application in JS2 for stoping, starting, undeploying
> and deleting applications.  When I undeploy/delete the
> application through this portlet the
> PersistenceBrokerPortletRegistry is called which
> updates the database with the changes, but does not
> update the PSML fragments.  The local-portlets.xreg
> still contain entries for the deleted portlet
> application.
> 
The FusionPAM has a method to cleanup its ref integrity from portlet to 
entities:

     private void removePSML(String name)

This used to be hooked into the old PAM lifecycle, but some refactoring 
of J2 obsoleted its entry point. Maybe you should add it as admin 
utility: clean up orphaned PSML entries.

So its sort of incomplete right now, sorry

> Looks like the FusionPAM class is has methods to take
> care of this and it is just not being called?

yup

> 
> Question 2: All deployed JSR-168 portlets seem to pick
> up the categorization from its parent PSML fragment. 
> I am aware that you can use the administrative portlet
> to modify these categories after deployment, but is
> there any other way to configure what category these
> portlets should be deployed with?
Yes, two choices:

1) edit the fusion.xreg, add more categories:

     <portlet-entry name="JSR168Portlet" hidden="true" type="abstract" 
application="false">
         <meta-info>
             <title>JSR168 Portlet</title>
             <description>JSR168 portlet</description>
         </meta-info>
 
<classname>org.apache.jetspeed.fusion.portal.portlets.JetspeedFusionPortlet</classname>
         <category group="Jetspeed">JSR168</category>
         <category>Portlet API</category>
         <media-type ref="html"/>
         <media-type ref="wml"/>
     </portlet-entry>


use another parent portlet configured in the FusionPAM.properties:

fusion.jsr168.parent = JSR168Portlet

> 
> Question 3: How best to provide a default security
> role to JSR-168 portlets?  I realize that I can use
> the adminstrative portlet to update the security role
> for each deployed portlet, but is there any other way
> to provide a default security role for JSR-168
> deployed portlets?
> 
Well, could try adding a security constraint to the portlet-entry above, 
but it appears I didn't complete the cloning.

Best to complete this bit of code and send patch:
         //TODO:  figure out security

Regards,

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

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


Re: Dynamic Images and HttpServletRequest [J2]

Posted by David Sean Taylor <da...@bluesunrise.com>.
Frank Villarreal wrote:
> Hello all.
> 
> Couple of questions.
> 
> Q#1: I've been browsing the mail archives to no avail and finding I'm not
> alone in the need to serve up dynamic images through the portal ... which
> happens to be a two-request process (1-generate image and html, 2-pull the
> image down).  Also haven't seen any concrete way to accomplish it.  So, can
> someone please tell me how to reference the raw HttpServletRequest object
> from within a doRender response of a portlet?  I have a servlet that
> generates an image file and I'd like to "write" that file to some directory
> in my portlet directory and then create a link to it from an <img> tag in my
> view page.  The HttpServletRequest object supports the "getRealPath" method
> which can tell me where to output my image file to ... but first I need to
> get a handle on the underlying Request.  Help please!

Well the 2 phase sounds like a job for action/render phases of portlet 
api. But beware, you can't dispatch to servlets during the action 
(first) phase. So you may want to move your logic to generate the image 
into your portlet's action and out of the servlet. Then in the second 
phase, you can use something as simple as the FilePortlet (a servlet 
portlet) to display the image relative to your context.

As for "reference the raw HttpServletRequest object", just dispatch to 
it from your portlet.
Something like:

String path = "/raisons.jsp?orderno=5";
PortletRequestDispatcher rd = context.getRequestDispatcher(path);
rd.include(renderRequest, renderResponse);


> 
> Q#2: Apparently, the mail archive at marcaimsgroup is no longer archiving
> recent Jetspeed emails.  Does anyone know of a current and searchable
> archive for the jetspeed-user and jetspeed-dev mailing lists?
> 
We have mail archives at Apache

http://mail-archives.apache.org/mod_mbox/

-- 
David Sean Taylor
Bluesunrise Software
david@bluesunrise.com
[office] +01 707 773-4646
[mobile] +01 707 529 9194

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


Dynamic Images and HttpServletRequest [J2]

Posted by Frank Villarreal <f_...@tetco.com>.
Hello all.

Couple of questions.

Q#1: I've been browsing the mail archives to no avail and finding I'm not
alone in the need to serve up dynamic images through the portal ... which
happens to be a two-request process (1-generate image and html, 2-pull the
image down).  Also haven't seen any concrete way to accomplish it.  So, can
someone please tell me how to reference the raw HttpServletRequest object
from within a doRender response of a portlet?  I have a servlet that
generates an image file and I'd like to "write" that file to some directory
in my portlet directory and then create a link to it from an <img> tag in my
view page.  The HttpServletRequest object supports the "getRealPath" method
which can tell me where to output my image file to ... but first I need to
get a handle on the underlying Request.  Help please!

Q#2: Apparently, the mail archive at marcaimsgroup is no longer archiving
recent Jetspeed emails.  Does anyone know of a current and searchable
archive for the jetspeed-user and jetspeed-dev mailing lists?

- Frank


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