> What I would recomend you do is, extract the cocoon war file make the
> changes you need to make to it into a portlet servlet then package it into a
> war file again and deploy it into the jetspeed /deploy folder. let jetspeed
> take care of deploying it for you it does all the nessary steps in deploying
> the web application.
You are right. So, I tested once more and refined the steps to deploy cocoon:
(1) Rearrange the cocoon.war file.
Because portlet-api-1.0.jar file should be shared between Jetspeed-2 and a
portlet
application,
remove the WEB-INF/lib/portlet-api-1.0.jar in the cocoon.war.
(2) (Optionally) If Tomcat fails to extract all files of the cocoon.war file
after deployed, then
there could be memory leak problem. (Reference:
http://tomcat.apache.org/faq/memory.html).
In this case, you have to set JVM options like the following example
(catalina.bat on my
machine):
set JAVA_OPTS=%JAVA_OPTS% -Xmx256m -XX:MaxPermSize=256m
Then, remove cocoon.war and cocoon/ dir in the webapps/ dir. And try to
deploy cocoon.war
again. (Copy the cocoon.war into jetspeed/WEB-INF/deploy/ dir.)
(3) Then, you can see the message "Hello from CocoonPortlet!".
(4) (Optionally) You can use SVN version of Cocoon.
With Cocoon 2.1.9, you have to add new portlet definition to add another
cocoon page to your
portal page because the CocoonPortlet reads cocoon url from init parameter.
If you build cocoon.war from SVN, then you can use read-only preferences to
set cocoon url. So
you don't have to add new portlet definition for each cocoon url. See
https://issues.apache.org/jira/browse/COCOON-1998 for details.
In the above example from JIRA, the preferences were set in the psml for
the fragment. However
you can use read-only preferences in the portlet.xml also. Or you can implement
another portlet
extending ManagedCocoonPortlet, to provide advanced edit mode.
-Woonsan
--- dee factorial <[EMAIL PROTECTED]> wrote:
> Jetspeed does a little bit more than just load cocoon on startup. check out
> this document
> http://portals.apache.org/jetspeed-2/multiproject/jetspeed-deploy-tools/index.html
>
> What I would recomend you do is, extract the cocoon war file make the
> changes you need to make to it into a portlet servlet then package it into a
> war file again and deploy it into the jetspeed /deploy folder. let jetspeed
> take care of deploying it for you it does all the nessary steps in deploying
> the web application.
>
> if you are having memory issues, check out this page
> http://tomcat.apache.org/faq/memory.html
>
> from that JIRA issue did you try adding the
> <preference name="servlet-path" readOnly="true">
> <value>samples/blocks/portal/portlets/helloworld</value>
> </preference>
> to your fragment in the psml file ?
>
>
>
> On 6/20/07, Woonsan Ko <[EMAIL PROTECTED]> wrote:
> >
> > Looking back on my experience, I has met three problems in deploying
> > cocoon.war:
> >
> > (1) Because cocoon.war file is too large, sometimes Tomcat fails to deploy
> > the war file.
> > (2) Because cocoon web app has too many pages, sometimes the JVM complains
> > it.
> > (3) If there's portlet-api*.jar file in cocoon/WEB-INF/lib, it should be
> > removed because the jar
> > file should be shared between Jetspeed-2 and a portlet application.
> >
> > So, my solution was like this:
> >
> > (1) Extract cocoon.war file manually to webapps/cocoon/ directory, and
> > remove
> > cocoon/WEB-INF/lib/portlet-api-1.0.jar file.
> > (2) Add Jetspeed container servlet configuration manually to cocoon's
> > web.xml if there isn't. For
> > example,
> >
> > <servlet>
> > <servlet-name>JetspeedContainer</servlet-name>
> > <display-name>Jetspeed Container</display-name>
> > <description>MVC Servlet for Jetspeed Portlet
> > Applications</description>
> > <servlet-class>org.apache.jetspeed.container.JetspeedContainerServlet
> > </servlet-class>
> > <init-param>
> > <param-name>contextName</param-name>
> > <param-value>cocoon</param-value>
> > </init-param>
> > <load-on-startup>0</load-on-startup>
> > </servlet>
> >
> > <servlet-mapping>
> > <servlet-name>JetspeedContainer</servlet-name>
> > <url-pattern>/container/*</url-pattern>
> > </servlet-mapping>
> >
> > (3) (Optionally) Add JVM command line option for MaxPermSize if it is
> > supported. For example,
> > "-XX:MaxPermSize=256m". (This is against JVM's complaint on too many
> > pages.)
> >
> > (4) Then, you can see the message "Hello from CocoonPortlet!".
> >
> > (5) (Optionally) You can use SVN version of Cocoon.
> > With Cocoon 2.1.9, you have to add new portlet definition to add
> > another cocoon page to your
> > portal page because the CocoonPortlet reads cocoon url from init
> > parameter.
> > If you build cocoon.war from SVN, then you can use read-only
> > preferences to set cocoon url. So
> > you don't have to add new portlet definition for each cocoon url. See
> > https://issues.apache.org/jira/browse/COCOON-1998 for details.
> >
> >
> > -Woonsan
> >
> >
> >
> > --- dee factorial <[EMAIL PROTECTED]> wrote:
> >
> > > In Step 3, when you deployed the cocoon.war file to jetspeed did you
> > copy
> > > the the cocoon.war file to the Jetspeed/WEB-INF/deploy dir to deploy it
> > ? If
> > > so did you check to see if there were any errors when you deployed it ?
> > If
> > > you click on the PALM tab in the Administrative Interface you will be
> > able
> > > to see which applications are loaded into your Jetspeed Instance.
> > >
> > > I also noticed that you have the value of 7 in the row value, when it
> > > should be one, but I don't think that should make a big difference.
> > >
> > > Good luck,
> > > Dominique
> > >
> > >
> > > On 6/20/07, Bruce Atherton <[EMAIL PROTECTED]> wrote:
> > > >
> > > > I am trying to deploy a standard build of Cocoon 2.1.9 that contains a
> > > > JSR-168 portlet to Jetspeed 2.1, but I seem to be hitting a roadblock.
> > > > Following the instructions at
> > > >
> > http://portals.apache.org/jetspeed-2/multiproject/jetspeed-deploy-tools/index.html
> > ,
> > > > I did the following:
> > > >
> > > > 1. I built a WAR file of Cocoon 2.1.9 with the portlet included. This
> > is
> > > > called cocoon.war.
> > > > 2. I checked that the portlet.xml file contained a definition for
> > > > CocoonPortlet (as it does out of the box).
> > > > 3. I deployed the cocoon.war file to the Tomcat instance running
> > Jetspeed
> > > > 2.
> > > > 4. I modified
> > > > ${Jetspeed-2.1}/webapps/jetspeed/WEB-INF/pages/default-page.psml to
> > > > include:
> > > > <fragment id="dp-19" type="portlet" name="cocoon::CocoonPortlet">
> > > > <property name="row" value="7"/>
> > > > <property name="column" value="0"/>
> > > > </fragment>
> > > > 5. I started Jetspeed.
> > > > 6. I verified that a cocoon directory was created from the contents of
> > > > cocoon.war.
> > > > 7. I navigated to the Jetspeed default page.
> > > >
> > > > Instead of seeing the expected "Hello from CocoonPortlet" text, I get
> > this
> > > > error
> > > > message: "Portlet Application cocoon not available". The jetspeed.loghas
> > > > this:
> > > >
> > > > 2007-06-19 16:49:49,153 [http-8080-Processor25] ERROR
> > > > org.apache.jetspeed.aggregator.impl.RenderingJobImpl - Error rendering
> > > > portlet OID dp-19: javax.portlet.UnavailableException: Portlet
> > Application
> > > > cocoon not available
> > > >
> > > > I've asked on the Cocoon list but haven't received a response, and I
> > > > thought the people here might be more familiar with what is going on.
> > Have I
> > > > missed a step in deploying a portlet to Jetspeed here? What am I
> > missing to
> > > > get a portlet like this to deploy?
> > > >
> > > > Thanks for any help.
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > >
> > > --
> > > "In today's highly interdependent world, individuals and nations can no
> > > longer resolve many of their problems by themselves. We need one
> > another. We
> > > must therefore develop a sense of universal responsibility. . . It is
> > our
> > > collective and individual responsibility to protect and nurture the
> > global
> > > family, to support its weaker members, and the preserve and tend to the
> > > environment in which we all live." His Holiness the Dalai Lama, A Policy
> > of
> > > Kindness: An Anthology of Writings by and about the Dali Lama (Ithaca,
> > Ny:
> > > Snow Lion, 1990), 113-14.
> > >
> >
> >
> >
> >
> >
> > ____________________________________________________________________________________
> > The fish are biting.
> > Get more visitors on your site using Yahoo! Search Marketing.
> > http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> "In today's highly interdependent world, individuals and nations can no
> longer resolve many of their problems by themselves. We need one another. We
> must therefore develop a sense of universal responsibility. . . It is our
> collective and individual responsibility to protect and nurture the global
> family, to support its weaker members, and the preserve and tend to the
> environment in which we all live." His Holiness the Dalai Lama, A Policy of
>
=== message truncated ===
____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]