Continuing my saga of trying to get a Cocoon application deployed as a JSR-168 servlet into Jetspeed, I am experiencing the following odd behaviour:

When I call getServletPath() from a page that is called by the portal container, it returns without a leading slash. The exact same page when accessed through cocoon as a servlet results in getServletPath() returning WITH a leading slash. The lack of the leading slash is causing the EncodeURLTransformer to fail.

To be clear, I deploy a webapp called "myapp" with a portlet "myportlet". The root sitemap has:

   <map:match pattern="myportlet">
<map:mount check-reload="yes" src="myapp/portlet-sitemap.xmap" uri-prefix="myportlet"/>
   </map:match>
   <map:match pattern="myportlet/**">
<map:mount check-reload="yes" src="myapp/portlet-sitemap.xmap" uri-prefix="myportlet"/>
   </map:match>

The portlet-sitemap.xmap has:

     <map:match pattern="">
       <map:call function="displayServletPath"/>
     </map:match>

The WEB-INF/portlet.xml has:

   <init-param>
     <name>servlet-path</name>
     <value>myportlet</value>
   </init-param>

I also tried changing the value to "/myportlet" but it had no effect.

The displayServletPath flowscript function displays a form that outputs the value of the expression ${cocoon.request.getServletPath()}. When accessing http://localhost:8080/myapp/myportlet/, getServletPath() returns "/myportlet". When accessed through the portal, it returns "myportlet".

Has anyone got any suggestions as to why that is occurring and how to get around it? Could it have anything to do with the issues raised in this blog entry? http://bluxte.net/blog/2006-03/29-40-33.html

Again, any help appreciated.

Bruce Atherton wrote:
I am trying to take an existing application running under Cocoon 2.1.9
and deploy it as a set of portlets. Before I get that far, though, I
want to make sure I understand how to deploy Cocoon as a JSR-168
portlet. To that end, I went through the following steps of trying to
get Cocoon to work as a portlet inside Jetspeed 2:

1. I built a WAR file of Cocoon 2.1.9 with the portal block (and
associated dependencies) included, as well as the samples.
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 navigated to the Jetspeed default page.

Instead of seeing the expected hello world business, I get this error
message: "Portlet Application cocoon not available".

Have I missed a step here? What am I missing to get a basic build of
Cocoon to deploy as a portlet in Jetspeed 2?

Thanks for any help.




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


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

Reply via email to