Hi John,

> -----Original Message-----
> From: John Rousseau [mailto:[EMAIL PROTECTED]
> Sent: vendredi 13 ao�t 2004 18:38
> To: Cactus Developers List
> Subject: Re: Portlet support
> 
> On Fri, 13 Aug 2004 10:35:40 +0200, Vincent Massol <[EMAIL PROTECTED]>
> wrote:
> 
> >> Can you give me the same laundry list of things to do to adapt the ant
> >> integration?
> >
> > * There are 2 Ant tasks: <cactifywar> and <cactus>. How is a portlet
> > deployed? As a WAR file? If so, you need to modify cactifywar so that it
> > supports cactifying a portlet war.
> >
> > * For the <cactus> task, you need to implement the classes that starts/
> > stops the container you're working with (which is?) and the code that
> > configures/deploys the portlet archive. For this, create a
> > o.a.c.integration.ant.container.[containername] package. You can check
> the
> > other similar packages to see how it's done for the other containers.
> >
> > Let me know if you have more specific questions.
> 
> Hi Vincent,
> 
> I'm a bit stuck with the ant tasks. Let me give you a little background.
> 
> A portlet (or set of portlets) is deployed as a class(es) in a WAR file.
> It's a regular WAR file which also contains a /WEB-INF/portlet.xml
> descriptor. 

Ok. So there is no web.xml file, right?

> This is called a portlet application. There is no URL mapping
> information in the portlet.xml file. It's up to the portal (a separate
> peice of software, often "installed" on the app server, not deployed) to
> determine how to call the portlets. The common pattern is that a portal
> renders pages with portlets on them, so there is no direct link between a
> portlet and the URL that invokes it. Most portals do however have some URL
> syntax that allows you to invoke a portlet directly for testing purposes.
> As I mentioned earlier, all portals do this differently.
> 
> Currently the catifywar task modifies the web.xml to add the URL mapping
> to the appropriate redirector. This isn't meaningful in the portlet case
> because there is no mapping to the portlet in the portlet war.
> 
> What I need to do is add some parameter to the cactus task to specify the
> URL to use to get the portal to render the portlet redirector. 

Ok

> The portlet
> redirector will be deployed in the portlet WAR being tested. Any ideas on
> how you would like the task syntax to look to handle this?

>From what I understood, there are no web.xml file in a portlet application
and thus the cactifywar should not try modify the web.xml file. However it
should add the Cactus jars. Then at execution time (i.e. the <cactus> task,
we need to pass some information, namely the URLs to call the portlet
redirector.

I think the best solution would be to:

1/ create a separate Ant task: <cactifyportletwar> or something like this
that would reuse some code from cactifywar but not try to modify a web.xml
file. Alternatively maybe there is a possibility of modifying the existing
cactifywar and add an attribute to it (such as: cactifywebxml =
"true|false", defaults to true).

2/ create a nested element for the <cactus> task, say <novellportal> (I
don't know the portal container name) and make it support the portlet
redirector URLs as attributes.

Of course it won't be that easy (there might be some issues with ping URLs
for example) :-).

> 
> I'm currently deploying our (Novell's) own portable portal and portlet
> container on JBoss 3.2.5, but we can run on the Novell ExteNd app server
> as well as WebLogic, WebSphere and straight Tomcat. The current appserver
> specific invocation code should work fine, we just need a way to tell it
> what URL to invoke.
> 
> Thoughts?

See above and let me know if it would work.

Thanks
-Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to